The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Migrating WordPress from subdomain to root Reply To: Migrating WordPress from subdomain to root



I wrote the post on, and I did subsequently edit it instruct people to COPY instead of MOVE the index.php file. Either works, the point is that you don’t want to leave any directory without an index.php file because it allows people to view the directory contents.

Following the process I’ve outlined, the index.php file left in the subdirectory isn’t used for anything other than preventing directory listing, so it can be either the original copy of the index.php file or the silence is golden index.php file. I changed my instructions to be consistent with the WordPress codex not because they were wrong but because it’s easier to have people make a copy of the file rather than create a new silence is golden index.php. Since people didn’t know why the codex was different than my instructions, I thought I’d keep it simple and stick with what the codex has.

Anyway, if anyone gets stuck with the process, please contact me on my website.

You never want to use a redirection for this process, because it will mess up your WordPress application functionality. The whole purpose is that you keep your WordPress installed in the subdirectory, and use the index.php file and the General settings to have the URLs for the pages and posts display from the root. In this set up, all of your uploaded files, themes, plugins, etc., still exist in the subdirectory. The only reason to do redirection would be on individual posts, however, that can be a pain if you have a lot of posts. The wildcard redirect is problematic because it then redirects all your WordPress core, plugins, themes, etc. – in other words, not good.