Testing the significant modifications on the replica WordPress website before replicating the changes on a live site is recommended. There are a variety of methods for doing this, such as one of them being the Softaculous Staging feature and using the TotalUpkeep backup plugin.
Here we’ll explain how to copy the WordPress website to test manually.
Warn: This tutorial is designed specifically for installations with a single website. If you’re using this Multisite feature, this method creates two separate MULTISITE installs. If you duplicate a building for a multisite, the repeated structure and data will be part of the multisite installation database and WordPress files. This may need to be clarified. If you need to familiarize yourself with the differences between single-site and multisite, please only use these steps to duplicate one-site WordPress setup.
Then! Check out our Nginx-powered WordPress Hosting for a better performance capable of managing multiple WordPress websites efficiently.
Copy a WordPress Site to Another Location
- Log into cPanel.
- Create a subdomain of the testing website – e.g., testsite.example.com.
- Launch the File Manager of cPanel and ensure Display Hidden Files is on.
- Navigate to your WordPress root directory and copy your WordPress files from your current directory to the subdomain root directory you created, usually the same name as the subdomain itself.
- Choose ALL WordPress files.
- Beware! When selecting your WordPress files, ensure the folders containing the subdomains/addon domains and the other WordPress folders aren’t fixed. After you click “Select All,” hold on to the Ctrl keyboard button and select the folders that aren’t being moved so that they are not highlighted before copying files. You’ll need the Command key to accomplish similar things if you’re using an Apple computer.
- Click Copy at the top of File Manager.
- Type the path to the new subdomain document root folder.
- Copy the .htaccess file. This file should be placed where you copy-pasted your WordPress files or in the root of your new location. The .htaccess file might contain vital references to the present WordPress installation. Under the setup you have set for your facility, you may require searching for the file at the root of your account. For instance, InMotion Hosting commonly uses an underlying document root called “public_html.” Check this place in search of the .htaccess file if you did not find it in the installation location for your WordPress website.
- Create a database. It will serve to differentiate testing sites from the main website. If you use the same database as your test site, the live site will reflect on your test website. The use of a different test site database stops this.
- Export your current database.
- Import your existing database into the new database that you created.
Configure Test Site
- Set up the Test WordPress wp-config.php file for the test website. This ensures that the site is running on the latest database.
- Modify this test website’s domain and home URL into the subdomain test, which will bring up WordPress’ database. WordPress database.
- The correct image links since they are in the database. However, they aren’t associated with the URL of the site.
Improve WordPress by implementing Security plugins and correct mixed content errors to allow SSL (HTTPS) usage using Very Simple SSL
Enhance WordPress by incorporating Security plugins and correct mixed content errors to allow SSL (HTTPS) use with Simply SSL.