• I’ve Referenced:
    http://codex.wordpress.org/Moving_WordPress
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
    (3rd Party)
    http://premium.wpmudev.org/blog/how-to-safely-move-wordpress/

    The Goal:
    I would like to move my WordPress Multisite up one directory;

    www.site.com/wordpress
    (to)
    www.site.com

    While maintaining the existing URLS on the Posts/Topics within the sites on the WordPress. The reason behind this is having netted many “Likes/G+’s/Tweets/Social Comments” off these URL’s.

    This MultiSite has 1 Site on it, /magagazine/. In the Network Admin under Sites it is defined as /magazine/. I created the multisite for the hopes in future growth, but made a fatal mistake in putting it in a subdirectory instead of the root directory. I would now like /forum/, /store/, and /home/.

    Can I move the WordPress MultiSite to the root directory while maintaining all the permalinks, some of which are custom Permalinks employing a 3rd party plugin? The above referenced guides aren’t clear on how to retain the permalinks, if possible.

    If there are any guides or if someone can offer a bit of clarity, that would be fantastic. I’m hesitant about moving forward. Thank you!

Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    Spellfix; This MultiSite has 1 Site on it, /magazine/*

    So, after further reading, I imagine it would be in my best interest to enable ‘SUBDOMAIN_INSTALL’. The idea is to move the MultiSite installation to the root directory, while maintaining all the links of the /magazine/ subsite.

    Currently, my wp-config.php is as follows;

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'www.incisionmedia.com');
    define('PATH_CURRENT_SITE', '/magazine/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    and my .htaccess is as follows;

    RewriteEngine On
    RewriteBase /magazine/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Under Sites / All Sites / /magazine/ / Edit the Domain and Path are unable to be edited.

    As previous mentioned, the idea is to move the installation to the Root directory, while maintaining all Permalinks (Custom Changed or Not). Then to add more sites to that MultiSite.

    So;
    http://www.site.com/magazine (will remain functional)
    http://www.site.com/forum (will be added)
    http://www.site.com/store (will be added)
    http://www.site.com/ (will be the root directory loaded site, different than /magazine)

    I can’t find anything anywhere about maintaining the Permalinks. There are dozens of articles for simply moving the MultiSite without regard for this data.

    I will continue to scour unrelated posts in an attempt to piece this puzzle together. Any support would be greatly appreciated.

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    I imagine this 3rd Party reference is a step in the right direction?
    http://wpengine.com/support/how-to-change-a-multi-site-primary-domain/

    I don’t mind getting my hands dirty in PHPMyAdmin as long as it’s a step in the right direction.

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    So I committed to a change, but reverted. Here’s what I’ve attempted;

    I followed the instructions on this website to Change the Primary Blog;
    https://wordpress.org/support/topic/default-multisite-redirect-to-one-particular-blog?replies=8

    All good so far, but still stuck in a subdirectory (domain.com/magazine/). NOTE: When I did this, the /magazine/ Directory could have been assigned to anything down to the root of the website, which I was unable to do prior. The idea was to create the root directory first, and put the magazine in an additional sub directory; domain.com/magazine/magazine/

    So that when I followed the step at the end of this post (with the help of the Moving MultiSite Codex);
    https://wordpress.org/support/topic/how-to-move-multisite-out-of-its-own-directory?replies=3

    Referencing Step;
    #12 I put in “domain.com/site” to be changed to “domain.com”

    I also accounted for all the changes that may not have been changed via this link;
    http://halfelf.org/2012/moving-wordpress-multisite/

    Thus, after the changes /magazine/ remains after planned adjustments.

    In the end, both sites were broken. I could log into the Network Admin and the Dashboard for the Root Site I created, but I could not access the Dashboard for the Magazine Site – which kept cycling through the Login Screen. The Front End for the New Root Site spewed out a considerable amount of error code, but that was likely Plugin Related because when I tried to access the Front End of the Magazine the Root Site gave me a working Front End 404.

    There were several places I could have gone wrong. For starters, the database changes I made had some “reference” and “redirect” tables that I questionably allowed to change, I have hundreds of plugins, and I could have gone wrong before when I swapped the Primary MultiSite domain (which could have broken a few tools). I also had several questionable changes to the .htaccess, I may have removed something I shouldn’t have. Many of the plugins made adjustments, such as WP Total Cache. I’m beginning to think changing the root blog is going to be very difficult, or I’m over complicating it.

    I AM STILL SEEKING SUPPORT. I’m willing to cause damage to the database until I get this right, I have backups. Lets go people. Thanks.

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    I just attempted the reverse of what I wrote in the previous post.

    https://wordpress.org/support/topic/how-to-move-multisite-out-of-its-own-directory?replies=3

    I just followed this Step for Step (with Reference to the Move MultiSite Codex) with plans to change the primary blog later – After Changing the Entries on the Database – the site wouldn’t appear altogether, neither the front nor back end. This includes Clearing and Disabling CloudFlare.

    The site also disappeared in the prior attempt, I’m not sure where this is going wrong. Also, I’m unable to use the Search Replace DB Master on the wp_postmeta table – I’m not sure if that’s relevant.

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    Ok, still no feedback. For the record, using either of the methods I mentioned before WILL LOSE YOUR UPLOADS FOLDER (IE WORDPRESS MEDIA GALLERY) – even if you migrate the sites back. I’llbeit – I should have had a backup – but my Backup measures a TB in size. Am I stressed? No, it only contained meta images for the site and is an easy fix (2-6 hours of copying and pasting and reexporting from photoshop). This also allows me to waste more labor hours to fix URLs by hand now.

    In the end, it’s not a viable method. Meaning, a viable method is not listed to keep URLs – so if your down to lose content, give other forum posts a shot. I will continue to bump this post until I get feedback. I’ve been reading posts by other authors, is there a celebration over 4.0 resulting in neglecting WordPress users in need?

    I will bump this 4 times a day, if I need to. This is a must-have in a MultiSite. Thanks a bunch, I’ve provided loads of content to give the professionals a head start.

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    Now that I’m done repairing the Media Library…
    [shameless bump]

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Don’t bump, man. Sometimes people are busy.

    So … okay.

    Spellfix; This MultiSite has 1 Site on it, /magazine/*

    No it doesn’t. Unless you mean your insttall is domain.com/magazine/magazine – How do I know? Because of this:

    define('DOMAIN_CURRENT_SITE', 'www.incisionmedia.com');
    define('PATH_CURRENT_SITE', '/magazine/');

    That says your MAIN INSTALL of Multisite is http://www.incisionmedia.com/magazine

    1) Move ALL the files from /magazine to /

    2) Edit .htaccess and wp-config.php to change /magazine to /

    3) search replace the database and change incisionmedia.com/magazine to incisionmedia.com (use https://github.com/interconnectit/Search-Replace-DB )

    4) Next you need to manually go through these tables: wp_site and
    wp_blogs – fix /magazine/ as needed

    That SHOULD be it.

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    Thank you! You’re the man.

    I’ll give this a shot tomorrow! I’ll return with my results.

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    Oh, I realized this solution is incomplete.

    I need to maintain the “/magazine/” during this proccess without breaking permalinks. All you have described was how to move the MultiSite to the Root.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I need to maintain the “/magazine/” during this proccess without breaking permalinks. All you have described was how to move the MultiSite to the Root.

    Sorry I thought you needed to just redirect (which would be .htaccess stuff) and not KEEP the install.

    Easiest way is to edit the permalinks on the main site to be /magazine/%year%/%postname%/ or what have you.

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    Even with what you just told me to do — it just doesn’t work.

    The site moves, but it loads a white screen of death — nothing gets past it. I don’t understand.

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    Well, Yes, I wish to keep Permalinks in that fashion, but I also intend to add other Sites to the MultiSite — ie There will be a new Website at the root.

    At the Root, and more “/topic/” Sites.

    I’ve tried /wp-login and /wp-admin – and the root site. It goes to a white screen and nothing occurs. I inspect the element – there’s no code in there what-so-ever. This is the third time I’ve tried this – it’s the same results each time – minus one where I swapped incision magazine to become “/magazine/magazine/” and created a new Primary Site, the Primary site loaded but it loaded broken, and the magazine subsite wouldn’t load at all.

    *update* Now I’ve deleted/heavily altered the .htaccess file, and the /wp-login gives a 404. Not much progress, but it’s different.

    *additional update* I started putting files back/restoring the website, and before recovering from backup on the PHP Tables, I tried loading “/magazine/” from the changed tables. It actually loaded something, relevant data, broken of course — but the minute the WordPress files leave the /magazine/ directory the whole thing goes “white screen of death”. I’ve changed the .htaccess, the wp-config.php, changed tables by hand, and did a search and replace — 4 times.

    There is one universal error; “wp_postmeta” Table doesn’t seem to get accessed. So I change that by hand — although I’m not sure if that’s enough, considering the tables size.

    Any thoughts?

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    Is there away to keep the installation in /magazine/ without the stress of moving it, then loading the files from the ROOT, finally setting up a ROOT Site and more “/topic/” sites. I saw only 1-2 other posts on the subject, and they both ultimately exported and re-imported their website. I’m open to that alternative to an already launched and running Multi-Site.

    Thread Starter Doctor Psyringe

    (@nicholasdesuza)

    The migration error may be plugin related – I’ll have to investigate further.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Changing Directory while Maintaining Permalinks’ is closed to new replies.