Home Home Page cPanel How to move a WordPress site from one directory to another?

Moving a WordPress website can be a daunting task especially if you are not tech-savvy. The process is made complicated by the many inconclusive tutorials available out there. There are two major approaches to moving a WordPress site:

1. Moving the website from one directory to another.

2. Moving your website from one hosting account into another hosting account.

We will be going over, “Moving the website from one directory to another” today.

In both cases, you need to make sure that you have a restorable backup of your files and database before you begin the migration process. If you mess up with the migration, you can easily restore your website from the backups. You will also be using the backup copies to recreate your site in its new location.

Moving WordPress from one Directory to Another

If you installed WordPress in a subdirectory, you might want to move it into the root directory of your hosting account. For instance, if you had installed WordPress inhttp://yourdomain.com/wordpress/ you might want to move it to the root directory to make the standard url into http://yourdomain.com/.

Step 1: Preparing your site for the move


Log into your WordPress website and go to Settings >> General. Look for “WordPress url” and change it from http://yourdomain.com/wordpress (or whatever you had named your subdirectory) to http://yourdomain.com. You might want to disable all caching plugins at this stage and clear all the cache stored by the plugin.

Log into your cPanel account and make a backup all your WordPress files and database. There are several free and premium plugins that you can use to accomplish this. One of the best free solution is BackUpwp, which lets you easily backup your database and WordPress files.

Step 2: Moving Your WordPress from a Subdirectory to the root directory

cpanel-file-managerLog into your hosting account’s Cpanel and find File Manager in the main dashboard of the cpanel and click on it.

Once in the File Manager, navigate to the subdirectory where you have installed WordPress. Select all the files and folders in that directory.

On the toolbar atop of the folder and files list, click on ‘Copy’. A dialog box will prompt you to enter your preferred destination. Type Public_html into the text field that appears and click on “Copy Files”. This will copy all your WordPress files from the subdirectory into your root directory.

Delete the old WordPress directory to clear clutter from your hosting account and save space.

Log into your WordPress website by going to http://yourdomain.com/. Go to settings and check that the permalinks are the way you would want them to be.

Leave a Reply