migrating a wordpress site from subdirectory to root directory

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.

2. Make a back up of your database using UpdraftPlus or BackWPUp plugin. Download this file and keep it safe.

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:


undefined


2. Change the URL of your website (change path if you move it to different folder on same domain name):


undefined


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:


undefined



5. Contact your hosting provider to get instructions on how to move files on your specific server;


undefined

6. Clear browser cache.

7. Open your website using new address to make sure it works properly.



  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

wordpress blank pages

This article discusses what to do when WordPress displays a blank page, aka "white screen of...

How to improve WordPress Security

Nowadays we face a lot of security issues with different content management systems (CMS) and web...

editting php options

You can change the Php Options through c panel as follows 1. Login to c panel and search for PHP...

essential plugins

Having many plugins on your WordPress site is not a good practice as they slow down your...

changing url : database option

Wordpress changing in URLWhen you change URL, There are fields in a table to be changedThe table...