How to Move a WordPress Website from One Folder to Another

How to Move a WordPress Website from One Folder to Another

Website migration can be overwhelming if you don’t follow the correct procedure. Most of WordPress users complain of losing their website’s content while transferring it from one place to another.

The main migration takes place when you decide to switch web hosting companies. Sometimes, you might need to move the website’s data from one folder to another.

Most of the time, when you host a single website, the data remains in the primary/root directory, but if you decide to add an addon domain, changing the primary domain, you may in need to move everything.

I can’t forget the day when I was trying to transfer my website from public_html to a new folder, and I lost everything because of not having the backup.

Well, it’s always an essential step to take before you make any changes to your site. You shouldn’t forget backing up the database.

In this tutorial, you’re going to learn a step by step process to move your website from public_html to a new folder.

Learn to Play With cPanel and Transfer Your Website With No Pain

As I have mentioned, I am going to walk you through the website migration from the root directory to a new folder. The same process is useful even if your current WordPress installation is in a folder and you want to move it to the new one.

Note: Don’t forget to backup the site and its database.

So, roll on your sleeves up and follow the steps.

Step 1:

Open the cPanel and search for the file manager, that’s where all of your website’s data is available, you can easily find it under Files.

How to Move a WordPress Website from One Folder to Another

Click to open.

Step 2:

It’s possible that you may see the home directory, so navigate to the vertical menu and click on public_html. You can see many files and folders.

Step 3:

Before you proceed, it’s essential to create anew folder, where you want to move your WordPress website.

How to Move a WordPress Website from One Folder to Another

Go to the main cPanel’s navigation menu and click on the Folder icon.

A popup appears to fill in New Folder Name. In this example, I am filling in “new”. Depending on your choice, you can choose any.

How to Move a WordPress Website from One Folder to Another

Some website owners like to move their old website to a “blog” folder or something similar. Click on the Create New Folder Button.

Note: While filling in the folder name, you can notice the location, it’s in the public_html directory.

Step 4:

Now, refresh the page, and you can see the folder named “new.” Now, you need to copy all the files and folders except “new,” because this is where you need to move the rest of the data.

Step 5:

After selecting, either right-click or click on the Move icon from the main navigation menu.

How to Move a WordPress Website from One Folder to Another

A popup appears where you need to fill in the path. As you already know, the “new” folder is in the public_html directory; you require to add “public_html/new” as the path.

How to Move a WordPress Website from One Folder to Another

Click on the Move File(s) button. Depending on the size of the files and folders, the data will be moved.

How to Set the New Website URL

You have moved the complete WordPress installation from one location to another, and it means the main URL needs some modification.

Your old URL was https://www.example.com, but the new URL should be https://www.example.com/new

Note: Replace the folder name “new” with yours.

To do so, you need to edit the wp-config.php file, which is available in the new folder. Right-click to edit the file.

Define your site’s URL.

define('WP_HOME','https://www.example.com/new');
define('WP_SITEURL','https://www.example.com/new');

Save changes and you’re done.

Try checking your website, if everything works, congrats, you have successfully moved your WordPress site to a new folder.

Note: Sometimes, during migration, the image might get affected, to resolve, you can use the Velvet Blues Update URLs plugin.

If you see all the images accurately, no need to use the plugin.

Isn’t that Easy to Transfer the WordPress Installation

Every time people read something techie, they fret instantly. Reading and analyzing is essential before asking help from others.

Most of WordPress users seek help from their techie friends or web hosting customer support; they can accomplish such simple tasks themselves.

Conclusion

During migration, you only need to make sure you don’t delete anything. Sometimes, people might modify the folders.

Backing up the website and its database is always the first step to take. I hope you can easily move your site.

Check out these top 3 WordPress hosting services:

Hostinger
£2.36 /mo
Starting price
Visit Hostinger
Rating based on expert review
  • User Friendly
    4.7
  • Support
    4.7
  • Features
    4.8
  • Reliability
    4.8
  • Pricing
    4.7
FastComet
£1.41 /mo
Starting price
Visit FastComet
Rating based on expert review
  • User Friendly
    4.7
  • Support
    5.0
  • Features
    4.8
  • Reliability
    4.5
  • Pricing
    5.0
A2 Hosting
£2.36 /mo
Starting price
Visit A2 Hosting
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.8
  • Pricing
    4.0

How to deactivate all your WordPress plugins at once from cPanel

While handling a WordPress website, you may encounter with many common WordP
4 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to Delete Extra Database Tables After Uninstalling a WordPress Plugin

Not all the plugins come with an option to delete all the settings
4 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to Edit the CSS for your WordPress Site Using the cPanel Hosting Control Panel

As you know, the design of a WordPress website is controlled by
4 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Edit Your WordPress Website's .htaccess file Using cPanel

There are many files and folders present in the WordPress direc
4 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top