Before migrating WordPress from subdirectory to root directory
1. Be sure you have access to your web hosting control panel and File Manager within the control panel as well as access to phpMyAdmin should you need to revert the changes you make to the WordPress General Settings below.
3. Remove any old site files from the root directory — perhaps copy them to a folder called _backup – this includes an index.html file which will totally make this process not work. You MUST remove all those old site files and folders or move them into another directory, so they don’t interfere with WordPress. Having an index.html and index.php in the same folder causes confusion, and likely, the index.html will be used instead of WordPress’ index.php file;
4. Make sure you don’t have any other folders in the root directory that have the same name as any pages on your WordPress site, for example “blog” unless of course this is the name of your subdirectory install of WordPress in which case you cannot have a page of the same name because the browser will get confused and look for that page in that folder, then things are really confused.
Moving WordPress installation from subdirectory to public_html directory
1. Access WordPress dashboard and go to Settings > General:
2. Change the URL of your website (change path if you move it to different folder on same domain name):
3. You will get the 404 error page. That’s normal. Proceed with the next step.
4. Connect to your FTP server or use hosting CPanel FileManager tool and move all the files to new directory:
5. Contact your hosting provider to get instructions on how to move files on your specific server;
6. Clear browser cache.
7. Open your website using new address to make sure it works properly.