Generally, word press sites are placed in the root folder of the hosting server in which these are hosted. If it has been moved to any sub directory, it can be very easily moved back to the root folder. However, you will have to make some changes to the Site’s URL in the Dashboard.
In this tutorial, we will teach you to move wordpress in root directory.
Step 1 – Open General Settings
First of all, we have to change our site’s URL according to the root destination. For that, go to the Settings tab located on left side of your dashboard and click on the general option.
Step 2 – Change Site Address
Now go to the WordPress Address URL field; remove the sub directory path and just place “wordpress” over there. “Wordpress” is basically the name of our main site’s folder
With that done, remove the path from Site address field and let it be only localhost along with the port number.
Next, we have set the URLs to move wordpress subdirectory to root.
Now scroll down to the bottom of the page and click on the Save changes button over there.
Step 3 – Error will be displayed
Once you are done, you will get an error message on the page which you were viewing previously.
Just ignore this error for now.
Step 4 – Move the site
Now open your sub directory in which your main folder is saved. Cut this folder from here and paste the wordpress to root directory of your hosting server.
Once you are done, delete the sub folder which will be empty now.
Step 5 – Login to the site
Now go back to the browser and refresh the same page on which the error was being displayed. A login screen will open there where you will be asked to enter the credentials so that you can access your site. With that done, your wordpress site will open up. In this manner, we can move wordpress subdirectory to root folder.