WordPress staging: setting up a test environment and using it securely

17 min read

What happens if your site displays incorrectly after an update, or if a synchronisation overwrites the live data? WordPress staging allows you to test changes in a separate testing environment before they affect the live website. Staging is not simply a matter of making a copy: it is part of a carefully considered process of deployment and rollback.

The relationship between the test site and the live site is determined by the tool used. WP Toolkit, a staging plugin, and manual cloning require different settings and checks. For example, WP Toolkit’s functions may depend on the installed version and its configuration, so please review the options available on the interface before starting the process.

This guide explains how to select methods, set up a test environment and outlines the key aspects of testing. You will also learn how to create a backup, what to look out for during testing, and how to deploy the tested changes whilst minimising the risk of overwriting production data.

What is WordPress staging, and when is it worth using a separate test site?

Staging is a test environment separate from the live website. It typically consists of a copy of the site’s files and database, allowing you to check that WordPress, the themes and plugins are working correctly whilst visitors continue to use the live site. However, the WordPress copy may differ from the live version after it has been created: the content and settings there may be modified separately.

Staging enables testing before going live: you can first check changes in a separate environment and only then decide whether to deploy them to the live site.

This is particularly useful when a change affects multiple pages or features, and a bug could disrupt the live website’s operation. WordPress staging can help identify problems early on, but it is no substitute for a backup of the live website. The test environment may also contain faulty changes, and deployment could affect files or data.

What changes are worth testing on a staging site?

The test page is suitable for checking updates and functional changes. It’s worth trying out the following here, for example:

  • New versions of the WordPress core, themes and plugins;
  • installing new plugins or modifying the settings of existing ones;
  • new features, such as forms, navigation elements or custom template settings;
  • major changes to content or layout, which may affect the functioning of several pages.

Don’t just stop at ensuring the homepage loads correctly. Check the relevant subpages, the navigation, the forms and the processes that visitors rely on. For online shops, examine the product pages, the shopping basket and the ordering process, but only using test data. The live site may contain real customer data, so restrict access and ensure that testing does not trigger actual orders or unsolicited notifications.

What is the difference between a staging site and a live site?

The live site handles visitor traffic. This is where actual user actions take place, such as the submission of enquiry forms and new orders in the online shop. The test site, on the other hand, is a separate copy used for checking and testing changes.

The two environments may diverge over time. New content published on the live site or orders received there are not necessarily transferred to the test site, and changes made on the staging site are not automatically reflected on the live site. The method of transfer is determined by the tool used. Before going live, clarify exactly which files, database entries and settings will be transferred. This will prevent an older copy from overwriting the live data that has been generated in the meantime.

Setting up a WordPress staging site with WP Toolkit: preparation and process

WP Toolkit manages WordPress installations within the cPanel environment. The names and availability of staging and cloning options may depend on the installed version and configuration. Before proceeding, please review the options displayed on the interface and ensure that you have selected the correct WordPress installation.

What preparations are needed before cloning?

Before creating a copy, make a fresh backup of the files and database of your live site. Automatic backups are useful, but check that the most recent backup is available and can be restored if necessary. Make a note of the site’s current functionality, such as important subpages, forms and the login page. This will allow you to compare the staging results with the live site after the test.

Check whether WP Toolkit appears in your hosting control panel and whether it offers cloning or staging options for that particular installation. The cPanel menu items and available functions may vary depending on the version. If you cannot find the required function, first identify the settings for the installation and the hosting environment before manually copying the files or the database.

Creating a staging instance via the WP Toolkit interface

In cPanel, open the WP Toolkit interface, then identify the live WordPress installation based on the domain and installation path. The name of the function may vary depending on the interface; for example, it may refer to cloning or creating a staging site. The process typically involves selecting the source website, specifying the destination environment and initiating the creation of the copy.

  • Select the source: check that the production installation is actually selected.
  • Start the staging process: select the option to create a staging site in WP Toolkit.
  • Specify the target environment: if the interface offers this option, set up a separate subdirectory or subdomain. Check the full address and ensure that it does not point to the live website’s path.
  • Check the summary: review the source and destination details before approving the copy.

Once the process is complete, open your staging site’s URL and its admin panel. Try logging in, and load the homepage and a few internal pages. Restrict access to the test site and prevent search engines from treating it as live content. The steps within the WP Toolkit interface may vary depending on the version; other solutions, such as the WP STAGING plugin’s WordPress.org page, offer separate documentation for their features. The cPanel interface helps you manage your website environment, and staging should be set up using the tools available there.

WP Toolkit, a plugin or manual cloning: which staging method is right for you?

The best method depends on the type of control panel available on your hosting account, the level of control you require, and how much technical work you are prepared to undertake. A WordPress staging environment can be set up using a tool built into the hosting control panel, a WordPress plugin, or by manually cloning the site. The features of each solution are determined by the tool used and its version.

Criteria WP Toolkit Staging plugin Manual cloning
Ease of use It can be managed via a central interface, provided the feature is available during installation. It can be launched from the WordPress admin panel, via the plugin’s management interface. It requires file management, database operations and configuration.
Control This can be carried out within the scope of the operations offered. The possibilities are determined by the plugin’s features and version. It offers greater freedom of configuration, but requires more manual control.
Access This depends on the permissions available in cPanel and WP Toolkit. WordPress administrator access is required. Access to hosting, files and databases is required.
Maintenance You should follow the on-screen instructions and use the available functions. The plugin and its compatibility must also be managed. You are responsible for isolating the copy and keeping it up to date.
Video: Staging WordPress létrehozása WP Toolkit segítségével (aWh, in Hungarian)

When might the WP Toolkit or a staging plugin be the right choice?

WP Toolkit can be a convenient solution if you manage your WordPress installations via your hosting control panel and the version in question offers cloning or staging functionality. Centralised management can reduce the need to switch between separate tools. When choosing a plugin, check for compatibility with WordPress, PHP and your hosting, review its update history, and ensure that the required features are available in that particular version.

Cloning a site using a plugin temporarily uses additional storage space and server resources, as copies of the files and the database also take up space. For larger websites or where storage capacity is limited, it is worth bearing this in mind in advance. The options for cloning, deployment and resynchronisation vary depending on the platform. cPanel’s hosting management features help with website management, but the staging workflow is determined by the functions of the specific platform.

When is it advisable to set up manual staging?

Manual cloning may be justified if you need to precisely control the structure of the copy and have the necessary technical access. You must copy the WordPress files separately, create or select the test database, and then modify the configuration and the site’s URLs. If any of the links point to the live site, you may end up testing in the wrong environment.

When cloning a live e-shop, the manual method requires particularly careful data management. Whilst the cloning is taking place on the live site, new orders and customer data may be generated which do not necessarily appear in the test environment. The subsequent synchronisation of the databases therefore requires separate planning and verification. If you have no experience in managing files, databases and URLs, the hosting control panel or a documented plugin may provide a clearer starting point.

Testing and deployment on a staging site: how to reduce the risk of errors

A test environment is useful if, as well as trying out changes, you also consistently check the relevant functions. On the WordPress staging site, first check the loading speed and basic navigation, then test the forms, the login process and the functions necessary for the website to operate.

What should you check on the staging site before going live?

Start by checking the site’s basic usability. Open the homepage and key subpages on a desktop computer, then in mobile view. Click through the navigation, try submitting forms, and check the user login. Next, examine how customised features and plugins work together. Look out for error messages, layout issues and any elements that only malfunction after a specific action.

For online shops, test the ordering process using test data only, and do not initiate any real transactions. Check the product page, the functioning of the shopping basket and the feedback throughout the process. Also check that the search engine indexing restrictions are set correctly. Do not assume that the staging URL alone prevents indexing. Restricting access also helps to protect your data.

How should you handle deployment and rollback?

Before going live, make a fresh backup of the live website and check that it can be restored if necessary. When carrying out hosting management tasks in cPanel, please take the environment settings into account. You can manage the hosting settings for your website via the cPanel hosting interface.

Before going live, check carefully which files and database changes will be transferred from the test site.

This is important because, whilst testing is underway, new content, form submissions or orders may be generated on the live site. If the staging database contains an older version, transferring it in its entirety may overwrite the live data that has been generated in the meantime. Check the summary in WP Toolkit or another tool to see whether the operation affects files, the database or both. Do not initiate a full database replacement without first clarifying the consequences.

Think through the restoration process in advance. Make a note of where the production backup is located and which previous state you can revert to if you encounter an error after going live. After going live, check the homepage, the login page and the key functions. The right hosting plan and careful cPanel administration will help you manage the staging workflow transparently.

Long-term operation of a WordPress staging site with the right hosting infrastructure

A staging environment really comes into its own when WordPress updates, backups and operational checks form part of a consistent workflow. WordPress staging is not a one-off backup: it needs to be updated from time to time, and data migration must be planned before going live. The right hosting infrastructure provides the space for the files, databases and resources required for testing.

What hosting considerations support the use of staging?

A staging copy takes up space, and its creation and testing utilise server resources. The requirements depend on the size of the website, the volume of files and databases, and the cloning method chosen. A site that uses a lot of images, plugins or a large database may require more capacity than a smaller, introductory website. Choose your hosting plan so that both the live site and the staging copy can fit within it.

When choosing a hosting environment, take into account not only the requirements for running WordPress but also the operation of a staging environment. The WordPress hosting guide helps you review the factors relevant to your WordPress site. Consider what storage capacity and management options are best suited to your website’s operation. To set up a staging environment, you must take into account not only the hosting but also the features of the tool you are using.

How does staging fit into routine maintenance?

Establish a repeatable process: carry out the update, test it on the staging site, check the relevant features, then plan the go-live. Before each cycle, check that the live site’s backup is up to date and can be restored. In addition to the backup, ensure that only authorised personnel have access to the test environment.

HTTPS encrypts the connection between the browser and the website, but it is no substitute for restricting access. You should therefore manage the security of your staging environment by combining a secure connection with appropriate permissions and controlled backups. Once the test site is no longer required, remove it or restrict access to it, and do not leave any forgotten copies publicly accessible.

A well-designed test environment facilitates predictable WordPress operation: changes can be tested, hosting requirements are clear, and deployment is based on carefully considered steps. Exploring aWh’s hosting solutions is a useful next step if you’d like to review the hosting options best suited to your website.

Incorporate testing into your website development routine

WordPress staging provides lasting value when testing changes forms part of the website’s regular maintenance. Before implementing the next set of changes, specify who will carry out the testing, which functions need to be checked, and the steps required to implement the approved changes. This ensures that development is based on a transparent, repeatable process.

When designing your test environment, ensure that your hosting is tailored to your website’s requirements. With over ten years’ experience as a web hosting provider, aWh offers WordPress and cPanel hosting, as well as VPS hosting. Automatic backups can be part of careful system management, but they are no substitute for checking that the backups are accessible and can be restored.

If you’d like to find out which web hosting solution is best suited to your WordPress site, take a look at aWh’s web hosting solutions. With consistent testing and a well-considered choice of hosting, you can plan the further development of your website with greater confidence.

Our knowledge base article describes the steps to follow on aWh’s hosting service: Setting up a WordPress staging site using WP Toolkit.

Frequently asked questions about WordPress staging

What is a WordPress staging site?

A WordPress staging site is a test environment separate from the live website, where you can test changes without affecting the site as seen by visitors. It is usually accessible via a separate web address or subdirectory. The state of the staging site may differ from that of the live site after it has been created, so when testing, bear in mind when it was created and what data or settings have changed since then. It is primarily used for testing updates and new features.

How can I create a staging site with WP Toolkit?

In cPanel, open WP Toolkit, select the relevant WordPress installation, then locate the option for cloning or creating a staging site. Specify a separate destination if the interface offers this option, and check the source and destination addresses before confirming. The menu options and staging features may vary depending on the version and configuration of WP Toolkit installed. Try opening both the web address and the admin dashboard of the newly created instance.

Do changes made to the staging site automatically appear on the live website?

No, changes made on the staging environment are not usually transferred automatically to the live site. A separate deployment operation or manual copy is required for the transfer; the tool determines whether files, the database or both are transferred. Before you start the operation, check the details. Replacing the entire database, for example, may overwrite any live data that has been generated since the test instance was created.

Is it possible to set up a staging environment without a plugin?

Yes. If it’s available on your hosting account, you can create a copy using the WP Toolkit’s cloning or staging function without needing to install a plugin. The other option is to do it manually, which involves managing the files, the database, the configuration and the test site’s URL separately. This requires more technical attention. The cPanel hosting control panel provides the staging functions.

How can I prevent my staging site from appearing in Google’s search results?

Restrict access to the test site, for example by using password protection if your environment supports this, and also disable indexing by search engines. In WordPress, check the privacy settings, but do not regard this as access protection in itself. The block specified in the robots.txt file does not make the website private either. When making the staging site live, check that unauthorised visitors cannot access the content of the test site.

Is it safe to update WordPress plugins on a staging site?

Yes, the staging environment is suitable for testing plugin updates, as it isolates the test from the live site. If you spot an error, update plugins one at a time; this makes it easier to identify the affected plugin. Check key functions, such as the login page or forms, and keep an eye out for any error messages that appear. The test environment is no substitute for a backup of your live site, particularly before going live.

What happens to new orders coming in on the live site whilst using staging?

The live site can still accept new orders whilst the staging site is being tested; however, these will not necessarily appear in the previously created copy. If you copy the entire staging database to the live site, any orders received in the meantime or other recent data may be lost. For online shops, carry out tests using test data, and before going live, identify exactly which database operations you are initiating. Make separate arrangements to retain new orders.

Back to the blog