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:
- Update the WordPress address and site address in the WordPress database
- Move the files to the new location
- 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.
If so, please join over 10,000 people who receive exclusive weekly online business and blogging tips, and get a FREE COPY of my eBook, 10 Steps to Free Website Traffic! Just enter your name and email below:
If you're building a business website these days, you're in luck.
WordPress has revolutionized the ease and power of what a website can do and be. Now you can quickly create a website that is optimized for top search results, and update it yourself whenever you want.
As you'll see in a moment, the SmallBiz Theme is much more than a mere WordPress theme. It's a complete solution for your business web presence including a Website, Blog, Facebook Page and Mobile Website.
Let's take a look at each of these, and how they help you generate new business from the web…
Click to continue...See my disclosure about advertising and affiliate links






{ 182 comments… read them below or add one }
← Previous Comments
Next Comments →
Great write up. Much much much appreciated!!
thanks Don, exactly this I wanted to move stuff from yourstoryclub.com/wpstoryblog to simply on yourstoryclub.com before I use permalink and SEO optimization. Let me try. Will get back to you with result
Oh no!! Houston we have a problem!
I followed your instructions because I wanted to change the directory from http://products.takeaction-now.net/wordpress to http://products.takeaction-now.net. I changed the url in Settings in WordPress and saved them.
I then went to the Move files in the file manager of my cpanel and when I clicked Move, I received a message saying the files/folders already exist!
Now I cannot access WordPress as Admin as the url is now dead.
I have checked the file manager and from what I can tell from my limited experience the WordPress folder is unchanged.
Am I dead in the water and will I have to delete WordPress and reinstall and start my Website from scratch??
Thanx……Craig
Hi Craig,
So you had WP installed in the /wordpress folder, and you wanted to move it to the / folder, right?
You need to copy all those files to the root directory. I’m not sure how you did the copy but you can probably ignore the files exist message and copy them over anyway.
If you want to restore the URLs in WordPress back to what they were, you can use the wp-config.php file in your /wordpress directory to do that. See this article: http://codex.wordpress.org/Changing_The_Site_URL#Relocate_method
Yes that’s correct Don,
I have WP installed in products.mydomain.com/wordpress and want to move it to products.mydomain.com/. The issue I have is the file manager in cpanel doesn’t have a select all to move files or folders. From what I can see you would have to move one file at a time…not very efficient.
I then decided to use Filezilla (I am a Ubuntu user) to copy files and have since found out this is not a permitted function. Apparently one has to copy/move files to pc, then copy/move them to directory on server! This seems a waste of effort to me?
Can you suggest another way to do this? Or a different ftp client?
Cheers….Craig
Craig, I’ve used many ftp clients and they all allow you to move files and folders directly on the server without having to download them to the PC first. There must be something in the way you are selecting the files…
Here’s a screen shot of how to move files using the File Manager in BlueHost’s Cpanel: click here for screen shot
Yeah you are probably right Don….
I’ll do some more research and if I am not confident I can do this I will contact my hosting company to see if they will do it for me.
Thanks …. Craig
Hi,
Nice video, very useful. I have done all the steps and my home page comes up but none of the posts come up, I have 404 error.
any ideas?
thanks
adam
Hello Adam,
I have exactly the same problem today. Did you find the reason why you had this problem? Kind regards, Doris
Hello again,
I have found the solution: might help someone else.
I deleted the .htaccess file in the directory where WordPress is installed, for ex. mysite/wp, and then resaved the permalinks under Settings.
This created a new .htaccess file which fixed the problem.
Doris
Thanks for the helpful video. I just moved my WordPress site into the top level directory and thanks to your help, it was a snap!
Susan =)
That’s great – thanks for dropping by Susan!
Good tutorial. First timer here. What do I do if there’s files (existing site that I’m replacing) already in the parent/root directory? Do I delete all those files, or are there some that should remain?
Hi Josh,
I ALWAYS back them up first. Then depending on the site, you can delete the index.html or index.php that is in the root before moving WordPress over it.
Brilliant! Sooooooo much clearer than the crap on Wordpress.org that is almost unintelligable! Thank you, thank you, thank you!
Thank you Roger!
I’m on a mac as well — which FTP app are you using to move them over?
Thanks for the help
Hi Noah,
I use Transmit. I also like CyberDuck (which is free.)
I canged the Url to carushka.com erased press at the end of it. Ok that was done also Im using BlueHost but what do I copy? The press folder? and move iot to where?
Hi Emmanuel,
The video in this blog post walks you through the process. You need to move all the files in the /press folder up one leve to the root. Watch the video to see how it works.
Well I was able to get it with Bluehost techs but its still not right Bluehost techs really suck! They can’t really help much look at my site carushka.com but when you click on home you get carushka.com/press they can’t help me get rid of that. I went into the Phpadmin part of the bluehost removed press at the end and I get 404 Error and I can’t even login to my Wordpress admin its a mess!
Emmanual,
The URL still lives in your WordPress DB – I showed how to change that in the video. You can also use this method to change it after the fact:
http://codex.wordpress.org/Changing_The_Site_URL#Relocate_method
This Is amazing video you posted .. looks so good to be true .. should i dare try
One more thing .. moving up one level doesnt mess up my posts plugins or comments right ? i messed it up once before dont wanna be in that mess again ..
Thank you so much
No it won’t effect your blog posts and comments. Make sure to backup before you move, of course. Words of wisdom any time you are changing something on your website or blog
Thanks DON … it worked wonders
everything is working fine .. now i have to point my External links in the right direction .. any tips ?
And you done it alot better then other Tutorials who made me think i should be a full DEVELOPER to do that Moving Process … Kudos Mate
Thanks a lot..
its really helped me to move my site to another Location..
really thanks ..
vivek
Help! I just tried doing this and moved everything over like you suggested and my old site is still showing up. I can’t access anything in my blog to change the url back to it now either. So I’m stuck… and freaking out…help!!!
Give the link mate … and the link you changed into ..
Your video is excellent! It worked perfectly.
I had the site transferred in minutes. What a time saver.
Thanks for a good post.
usefull video.. i moved my site and made update url plugin. the thumbnails don’t work…. (even if they are in the same directory)
any idea how to update these different sizes?
Ajna,
Your image URLs probably still contain the old url. You can easily fix these up with the free Update URLs plugin by Velvet Blues.
Hi Don,
Thanks for your answer!
I already installed the update url plugin and activated it. when i run it zero attachments are updated…i have appr 88 photos…
in de media library the right url is mentioned (wp/downloads), only the thumbnails don’t show up. in the library when i click on edit picture the photo does show, but not in thumbnail format. is the resizing not done automatically?
Anja
Hi Anja,
That depends on your theme. But usually they are not auto resized unless your theme is using Post Images or has something special built in.
I need to go a little further beyond just changing a URL.
Is there a way to configure WordPress to use a remote location for storing all files (e.g. images, HTML, etc)?
The server that hosts my Wordpress site is a virtual machine template that won’t persist content. Any new images or other content I create is lost anytime the server reboots and the original version of WordPress is re-deployed. I do have the ability to modify the instance of Wordpress which is installed on the virtual machine image but any changes I make will be static (i.e. all dynamic content is still lost every time the machine reboots).
I would like to configure this hosted version of WordPress to point to some other location for storing all content. Does anyone know how to do this?
I have a UNC name for a persistent file store that I could use.
Michael, honestly I think you should use another method to host your WordPress installation. There are too many things that you could lose by using a transient host like that.
Don,
I’ve used other procedures before for moving WordPress however yours was very easy. I was not aware of that plugin which is much easier than going into PHPMyAdmin and doing a search & replace. It did miss a few links that were relative links (\folder_name\some-image.png) and didn’t include the full URL. I suspect I could have run the program again to automatically fix those links too by entering the relative URL in to the Old URL search box but since there were not many, I just fixed them manually.
Anyway, thanks for the article!
Eric
thank you. this saved me big time!
Thanks! Keep up the good work.
Don,
Thank you so much a brilliant vid and worked perfectly
Hi Don,
Just wanted to say a quick thank you for saving me so much time and headaches in moving my wordpress website. After a few SQL database problems your video worked like a charm.
I really appreciate the time you put into making a high quality easy to follow step by step video like this.
Thanks again,
Darren
So Simple – why so complicated everywhere else I looked?!… Many thanks
Thanks for post! Just what I was looking for! You can see the result here http://www.ulfnilsen.com/
Great tutorial. Simple and easy to follow. I had been trying to do this the same way as if I was changing the domain to entierly new one and not just from root to subdomain. Had created a new database for the subdirectory and things wer not working correctly. I can believe how easy this was.
Great video , thanks.
Hi There,
Thanks for the post.
However, how it will reflect on the indexed pages by google? if you move a page and someone comes from the search engines you will get lot of “404 page not found” error no? this also can effect your ranking as bounce rate will grow up rapidly till google will index the site again and remove the pages with the old url from the index, this can take time, not mentioning frustrated users that cant view searched /requested pages.
Any solution to not to get yourself penelized by google? if not panalized loosing traffic or serve users that came from search engines..
Thanks,
A.
Hello A,
Yes, any time you move a website, if you have URLs on your website that people are linking to or are indexed in Google, you should take care to provide 301 redirects to the new URLs. We’ve got a tutorial showing how to do that in the SmallBiz User Guide.
Just want you to know YOU ARE A LIFE SAVOR!!! I was going to literally pay someone to do this because I didn’t want to mess it up, but after seeing your video.. I backed up my site and dove right in *(followed directions of course) and WAH-LA! Site moved to root directory. THANKS AGAIN!!!
Hi Don
I can’t tell you how much I am grateful to you for having shared this video. I spent many hours and headaches trying to get it all sorted easily, and here you were!
THANK YOU SO MUCH and long life to Expand2Web!
thanks for this! I was doing it the manual way.
what a time saver!!!!!!
Tks. This was really very helpful and easy to follow.
Hey Don, thank you so much for this very very helpful video. I have to help a friend of mine today in moving his wordpress installation and your video makes it seem very easy!
This is the best explanation I have seen regarding moving WordPress to its root directory. Clear, simple, well-paced. Thank you!
Hello Don, I would like to ask help about my problem on my website. I got this
Parse error: syntax error, unexpected ‘<' in /home/mymovie/public_html/wp-content/plugins/facebook-social-plugins/widgets/like-button.php on line 2
Do you have an idea how i can fix this? Please kindly help me.
Sincerely,
Juvy
Juvy,
Try deactivating and reinstalling that plugin.
Your tip worked beautifully but now i get double forward slash after the index URL of the site, like so:
http://www.toohforeeec.eq.edu.au//wp-content/uploads/Figbird-Sphecotheres-viridis.jpg
It works, but this is not proper referencing, should I be concerned>?
Ryan,
Yes you should fix that – did you use the VelvetBlues plugin? You should run it again to remove that beginning forward slash.
Hi Don
I just can’t believe how easy this is presented in your video, almost too good to be true! I have tried mirroring a website but it still has some problems, I don’t know why it can’t be this easy as in your video.
I have a dev.subdomain.com at dreamhost, once I finish developing that I want to move it to the root, Im going to give this a try.
Hi, great vid, thanks! What? about all the existing files I already have in the root folder? Should I move those out of the root before I move the wordpress site into the root? What happens when they are both in the root, does it create problems and a mess?
drew – good question. What did you have installed in the root folder before? I would avoid deleting files from the root folder unless you know exactly what they are.
Hi Don,
I have my existing site in the root. It’s a flash site. If I move my new WP site to the root, how will the server know which site to display – the old site or the new site. I’m done with my old site and want to remove it.
I see. First, back up the files in the root of your website.
When you copy WordPress into the root, it will copy a file called index.php into the root, and that should become the default file.
If not, you may have to get rid of the existing index.html file so that WordPress can become primary. It depends on how your host is set up.
But your hosting provider can help you with what they call the “default document” setting in your root folder. After the WordPress move you want it to be index.php.
Backup for sure! Sounds simple enough, just replace index.html with index.php. Thanks again Don. I’ll send you a link to my site when it goes live in a day or so.
Hi Don,
Need your help. I changed the urls in the admin panel, clicked save and received a 404 page not found error. So I’m not sure if the url’s indeed changed. Then I moved everything to the root directory and removed my old index.html file. Now I can’t see anything or access my admin panel to install the ‘update url’s’ plugin. Help!
drew,
Try updating your wp-config file – it lives in the directory where WordPress is installed. You can use these instructions:
http://codex.wordpress.org/Changing_The_Site_URL#Relocate_method
Thank you SO much for this! Really helped me out – everything worked spot on!
I have used this excellent tutorial a few times. For the first time today it has not worked and I get a blank screen when I log back into wp-admin now it has moved to root level. Any thoughts welcome!
I can snow see wp-admin more a firefox issue perhaps – but home page not visible th ethemes are not showing in th ewp-admin
Don,
Thank you for explaining this so well.
Mark Barrus
Hi Don, thanks for your instruction for moving the files to the main directory. It seems a very easy process but i guess not to me.
Ok, i did the first step: went to general settings and change the urls and website from kupuhawaii.org/development to kupuhawaii.org (right now what you are seeing is the old website at the main domain) and when i hit save suddenly it gives me an error message. Now i can’t even go the the admin and it always redirect me to the main directory.
Please help! thanks so much in advance!
Jo,
Take a look at this, it will help you fix it:
http://codex.wordpress.org/Changing_The_Site_URL#Relocate_method
← Previous Comments
Next Comments →