Moving WordPress to root

Get answers here.

Moderators: BBear, theunknownhost, flaguy

Post Reply
User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Moving WordPress to root

Post by Arf » Thu Nov 10, 2011 9:50 pm

I've done a lot of reading on moving WordPress from /home/$user/public_html/blog/ to /home/$user/public_html/ . None of this seems very easy. I've even changed the document root of the account to the blog directory but that too messed things up.

Has anyone done this successfully?

User avatar
newcanada
Hosting Superstar
Posts: 1702
Joined: Wed Jan 26, 2005 8:00 pm
Location: Canada

Post by newcanada » Thu Nov 17, 2011 11:38 am

I have not done this successfully, and it's been a real pain. The only thing that has worked is to export/import from one install to another and then copy over all of the /wp-content/ sub folders over manually.

Then of course, change the site url in the dashboard.

User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

Post by Sapphyre » Thu Nov 17, 2011 2:25 pm

Is it because you want to remove /blog/ from all URLs
OR
is it because the user wants http://domain.com/ to be the WP (i.e. WP as the site's homepage) but does not mind if /blog/ appears in subsequent URLs ?

User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Post by Arf » Thu Nov 17, 2011 5:52 pm

it because the user wants http://domain.com/ to be the WP.

The export/import option worked but was painful. Thankfully, the web guy doing the job knew exactly what to do. I was impressed.

User avatar
mbodamer
Hard Drive Crasher
Posts: 949
Joined: Tue Oct 14, 2003 7:13 pm
Location: Abaco, Bahamas

Post by mbodamer » Thu Nov 17, 2011 6:59 pm

Thomas,
I have done this ONCE with wordpress.... and about 150 times with joomla. All I did was move the contents of the folder to root and it worked. Period, thats it.

since the software uses relative links it shouldnt be an issue. A way to test is to install a test blog on a test IP, then just move the contents and see if anything breaks.

I have done this for ALL my joomla installs because I always had an older site and was developing a new one under /newsite and then when finished I copied the / to /oldsite and then moved the contents of /newsite to / and everything worked. There was about 1 minute downtime as the files were being moved.

hope it helps.
Mike

nigel
Nothing better to do.
Posts: 342
Joined: Mon Apr 22, 2002 12:00 am
Location: Sydney
Contact:

Post by nigel » Thu Nov 17, 2011 10:21 pm

I've moved WordPress before. Customer had an old website in the root directory and their new wordpress site in public_html/wp/customername/

I moved the old site to /oldsite and then moved all the contents of the wp site to the root directory. I did a grep search for the old directory and made all the changes. I did the same to their database and configuration file. After that, everything should work.

User avatar
newcanada
Hosting Superstar
Posts: 1702
Joined: Wed Jan 26, 2005 8:00 pm
Location: Canada

Post by newcanada » Fri Nov 18, 2011 6:03 am

mbodamer wrote:I have done this ONCE with wordpress.... and about 150 times with joomla. All I did was move the contents of the folder to root and it worked. Period, thats it.
I will try that as well.

I assumed the mysql db would hardlink the relative urls..

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests