How to Move WordPress to another directory or folder

by on March 3, 2011 · 198 comments

If you installed WordPress in a sub-folder or sub-directory under your domain, and want to move it to the root of the domain, there are a few things you need to be aware of.

For example, what if you installed WordPress in: http://www.yourdomain.com/wordpress/

but you want to move it to to top level of the domain like this: http://www.yourdomain.com/

Well, its not hard if you know what to look for. In this video, I’ll show you how to move your WordPress installation to another directory and how to make sure that all of your content and images are moved over properly too.

Here’s a quick summary of the steps in the video:

  1. Update the WordPress address and site address in the WordPress database
  2. Move the files to the new location
  3. Fix up the URLs to any files or images you have uploaded via WordPress

Note: Make sure you back everything up before moving things!

Let me know if you have any questions in the comments below.

Article by »

Don is an entrepreneur based in Silicon Valley. He founded Expand2Web and is the publisher of the Expand2Web Blog, and the GetFiveStars Customer Feedback and Reviews service.

Don has written 313 articles on Expand2Web

Author Connect » Twitter | | Facebook |

See my disclosure about advertising and affiliate links

{ 30 comments… read them below or add one }

Anthony Ramirez January 1, 2013 at 9:18 pm

Thank you very much, this is much appreciated!

Reply

Ralston Vaz January 11, 2013 at 8:15 am

Thank you for this tutorial.

Worked like a prayer for our client’s site. We’ve happy campers.

Reply

Lynda Damiata February 23, 2013 at 3:36 am

How about the opposite, where the current 2012 site files need to be moved to a file named 2012 in the directory, and accessible by a link (named 2012) on the 2013 site?

Basically they want to archive the whole 2012 site content, keep it accessible via a link on the 2013 site, and build the 2013 site pages fresh.

Thanks you for your help.

Reply

Tiffany Barry February 28, 2013 at 3:20 pm

WOW! I am so glad I found this video! Brilliantly done, easy to follow, and I loved how you explained the “why” behind all the steps.

Reply

Jill March 4, 2013 at 8:06 am

Have followed your instructions and moved our site and updated images, BUT… all except the Home page are giving error messages. What happened.

Reply

Jill March 4, 2013 at 8:30 am

Ignore my previous message. It’s all working perfectly now. Just needed to wait a bit for some reason.

Reply

florian March 4, 2013 at 11:49 am

you just saved me 2 weeks of work .. thanks ..

For anyone who has an image uploaded for their custom logo and fav Icon, make sure you change the url as well. its not changed by the change URL plugin.

thanks

Reply

Todd Carney April 14, 2013 at 4:46 pm

Many thanks for this video. In my case, I want to move my site laterally to another directory, from /public_html/k7tfc/wp . . . to /public_html/rvarc/ . . . . The k7tfc/ directory has its own WP installation. I have a few other WP installs in other directories. I think I did this so each would have its own database. If I go through the steps you’ve indicated here, and if I simply move (or copy?) everything beyond . . . /k7tfc/ to . . . /rvarc/ will that work? I guess I’m wondering if this will break the link with the database, or does the procedure you demonstrated take care of that?

Thanks so much!!!

Reply

Surrey Builders April 30, 2013 at 8:38 am

Though it might appears easy, you will be amazed how many clients have problems with this, this is very easy to read.

Reply

JF May 8, 2013 at 8:31 pm

very usefull topic ! Thanks !!

What is the FTP Client are you using in your demo ? (Because mine don’t manage the “move to parent” and it could save me a lot of time !

Thanks in advance !! 🙂

Reply

michael Basher May 17, 2013 at 7:09 pm

” Brilliant ” – Thanks ever so much Don Campbell.. (‘ ‘,)

Reply

JD May 18, 2013 at 12:53 pm

Loved the video. Thanks!

Reply

pinpindesmontagnes May 21, 2013 at 4:49 pm

Nice video.
Clear, useful. Thanks!

Just for information : actually there is a newer version of the plugin “update urls” that you are showing in the video. Now, there are some options to choose wich kind of data you want to move on…

Reply

Jesus Garcia June 8, 2013 at 12:38 pm

Worked like a charm. Thanks Don

One thing…if you are on a mac running MAMP you will need to restart the web server before relaunching the site with the new path or you will get error messages.

Reply

Janet June 20, 2013 at 3:37 pm

Hello – I followed the video, but when I typed in /wp-admin I got a warning (failed to open stream, etc. etc.) so I can’t login to the dashboard. Help!

Thanks

Reply

TipsBangla August 23, 2013 at 9:06 pm

Much appreciated it saves my time specially the plugins part is fantastic. Thanks

Reply

Jay Visariya September 28, 2013 at 9:47 pm

Great Tutorials. I expected to be a difficult task. But after looking at the video and doing it, it was really simple to do it. This video helped me alot and made it easy. Thank you for this post. 😀

Reply

Anne Katzeff September 30, 2013 at 9:35 am

Great tutorial, Don, thank you. I had 2 minor glitches:
(1) After moving the files, it took about 5 minutes for the page links to actually point to their new URL. At first, I thought I took a mis-step, then everything was ok.
(2) The “Velvet Blues Update URLs” plug-in didn’t update all of my image links, so I had to manually change many of them.
Otherwise, a refreshingly simple, easy to understand set of instructions.

Reply

Stephen November 8, 2013 at 10:33 pm

Didn’t work for me. We wanted to make a lateral move from http://www…….com/wordpres001 to http://www…….com/01. The site runs in /01 but we can’t find a way to have the domain resolve to /01

Reply

phil monk November 20, 2013 at 9:20 am

Thank you for sharing this..! complexity demystified 🙂

Reply

Shreya Joshi December 6, 2013 at 11:11 pm

Hi ,
Thank you very much for this video it is very nice to keep things simple

Reply

Candace February 9, 2014 at 1:54 am

Thank you for sharing an easy-to-understand guide for less experienced WordPress users.

Reply

plugin name author? March 29, 2014 at 7:48 pm

what is the name of the plugin or author? so we can get the right one. I downloaded the one by velvet blues I think, and it did not work. but they can do it for 29 bucks. yeah Im sure they can. no thanks.

Reply

Don Campbell March 29, 2014 at 8:03 pm

The plugin I’m referring to is free. Here’s the link: http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/

Reply

Nume April 7, 2014 at 1:07 am

I used this technique on Bluehost using only .htaccess file without any other modifications:

http://www.lolloland.com/2014/04/06/technote-move-main-wordpress-site-subdirectory-bluehost-com-htaccess-file-mod_rewrite

Good tutorial!

Reply

Don Campbell April 20, 2014 at 11:50 am

Thanks Nume. Can you check the link you provided – it seems to be broken.

Reply

Nume April 23, 2014 at 8:29 am

They have fixed it probably. Now it is functioning.

Reply

Brent Studer April 20, 2014 at 10:54 am

Thank you for creating this concise, easy-to-follow video. I’ve used it several times to move my own redesigned websites and others I’ve developed for friends. It continues to serve as a great refresher to remind me what I need to do and is so much easier to follow than all the other tutorials that are either trying to sell their own tools or unnecessarily complicated.

Reply

Don Campbell April 20, 2014 at 11:48 am

Brent – my pleasure, and thanks for the kind words!

Reply

Bill Brazier October 18, 2014 at 5:02 am

Hi Don,

Thanks for the help! Your excellent advice made changing directories very easy 🙂

Reply

Leave a Comment

Previous post:

Next post: