Migrating a website on the same server

All-in-One WP migration can be used to move your website between different servers or within the same server. The benefit of doing the migration with the plugin over a manual migration is:

  • less effort
  • less downtime
  • much simpler
Why would I want another WordPress install on the same server?

If you want to have a copy of your website to do development or testing, then having this copy on the same server reduces any chance that different server configurations could cause issues. There are 2 ways to create another WordPress install on the same domain – either as a subfolder (yoursite.com/dev) or as a subdomain (dev.yoursite.com).

Which is better? A subdomain or a subdirectory? A subdirectory will retain the same SEO benefits as your main site, whilst a subdomain will be seen as a separate entity be search engines.

Setting up a subdomain

One Click

Many hosting providers offer one-click installs on subdomains, so please check with your hosting provider. This is by far the easiest way to do it and taking the time to explore if you hosting has this option or can offer to do this for you can save a lot of hassle.

Manually

Alternatively, you can often set up the subdomain through a simple process in cPanel. Create the subdomain through the domain or subdomain section.

Create a new FTP access or use cPanel’s file manager to upload the WordPress files. You can get the files from WordPress.org, then unzip/extract the contents and upload the files to the root of your subdomain.

Next, we create a database via the cPanel of your hosting. Create the MySQL database and then create a user. The user can then be added to the database.

To install WordPress, browse to the subdomain in your web browser and the WordPress wizard will start. You can select your preferences and install the files that you previously loaded to the new subdomain and add the database credentials to complete the install.

Installing a copy of a site on a subdomain

Once you have a subdomain set up, install the All-on-One WP migration plugin, import your latest backup from your main site and save your permalinks twice. Your site content will now be duplicated on the new subdomain.

Setting up a subfolder

Log in to your website using FTP or cPanel file manager.  Find your root domain – usually, it is the /public_html/ folder that holds your wp-content, wp-includes and wp-admin. Create a subdirectory or folder under your root domain name. The name that you give this folder will determine the URL for your new WordPress install. If you call the folder ‘dev’ then the URL will be yoursite.com/dev.

Install WordPress by getting the files from WordPress.org, unzipping/extracting the contents and uploading the files within the WordPress folder.

Next, we create a database via the cPanel of your hosting. Create the MySQL database and then create a user. The user can then be added to the database.

To install WordPress, browse to the subdomain in your web browser and the WordPress wizard will start. You can select your preferences and install the files that you previously loaded to the new subfolder and add the database credentials and complete the install.

Installing a copy of a site on a subfolder

Now that you have the new site set up, install the All-on-One WP migration plugin, import your latest backup from your main site and save your permalinks twice. Your site content will now be duplicated in the new subfolder

What if I just want my site content on a different folder to make my root directory less messy?

WordPress has the instructions at https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory. These instructions describe how to have a single WordPress site but have the content in a subfolder rather than on the root of your domain. As they state, this is for advanced users and we don’t recommend it for the average user.

What about Multisite?

Creating a multisite install for development or testing of a single site is not recommended. Multisite can be useful if you want a lot of separate subdomains that remain under your control, but it adds complexity for migration to single sites.

Leave A Comment?