How to Move a WordPress Install to your Website Root from a Subdirectory

Last night, I had to move a WordPress blog from a sub-folder to the website root. It was incredibly easy, in theory:

1. Before doing anything else, I changed both the website address (URI) and WordPress blog address under the “Settings – General” tab in the WordPress admin area to point to the root of the website.

2. I then copied all the blog files over to the root and deleted them from the sub-folder using Filezilla.

That probably would have worked for most people, but of course there was a snag:

A one-line PHP parse error message showed up instead of the website. I couldn’t even log in. It turned out the files causing the error had been truncated, so I had to go back to the latest WP core and reinstall them from there (instead of the core files I had copied over from the sub-folder). That did the trick.

A great benefit of using a popular CMS like WordPress is that when you run into unexpected problems, there’s a good chance someone else has experienced the same issues, so there’s no need to panic. Google is your friend—as is the WordPress site itself, which in this case has detailed info on Moving WordPress Within Your Site.

Scroll to Top