WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Path_Current_Site Problem? (4 posts)

  1. ypage621
    Member
    Posted 8 months ago #

    I set up a multisite on a temp url on a VPS a few months ago. The url looked like this:
    http://vps11639.inmotionhosting.com/~mxcced5/

    When I switched it to the new URL this weekend the name changed to mxcc.edu but the /~mxcced5/. I was able fix this on the main site but my sub sites still need the ~mxcced5 to function. Example mxcc.edu/~mxcced5/catalog (I can get to it from mxcc.edu/catalog but that's because I set up a redirect). Whenever i try to set up a new site it has the mxcc.edu/~mxcced5/newsite path going on. They should just be mxcc.edu/newsite.

    I would just get rid of the multisite all together but I'm using different plugins and themes on different sites so it makes sense to keep the multisite going.

    This is what my wp-config file looks like after the migration:
    define( 'WP_ALLOW_MULTISITE', true );

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'www.mxcc.edu');
    define('PATH_CURRENT_SITE', '/~mxcced5/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    I've tried switching define('PATH_CURRENT_SITE', to '/' or leaving it blank or taking it out altogether but (not surprisingly) that just gives an error connecting to database when I go to the main site. I'm not sure where to go or what to do. Does anyone have any suggestions? I'd really appreciate that.

  2. How did you change the domain in the database?

  3. ypage621
    Member
    Posted 8 months ago #

    I used this script as per recommended by the WP codex for moving multisites:
    http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    The first time I did a search and replace for http://vps11639.inmotionhosting.com/~mxcced5/ but that messed everything up so I reverted to my saved db and did a search and replace just for http://vps11639.inmotionhosting.com/

    After that everything needed the /~mxcced5/ after it and I magically did something I don't remember to make it work without it for the main site but I'm pretty sure it was just a poorly executed hack that only put a bandaid on the problem. I think maybe I went into the wp_options table for the main site and took out the /~mxcced5/ from site name and home but when I tried that for other sites I just got a 404 error page.

    Thanks!

  4. ypage621
    Member
    Posted 8 months ago #

    So I think I solved it last night. I changed the code in wp-config and .htaccess to the updated paths and then had to go into the wp_blogs table in my database and change the path there as well. Only when all of those things were done correctly did it work.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.