How to create a Siteground staging site? Well, it’s amazingly simple. I’ve been in this industry for more than 5 years now, and I know how important it is to have a staging environment for tests.
(This article made possible with the help of SiteGround)
Most people test every plugin and theme on their live website, and that may create issues.
It might break your site, ultimately, you’ll end up losing all the hard-earned content you have published, and that could be a headache.
Some plugins and themes out there are not up to date and they vulnerable to viruses as well.
Testing those plugins on your staging site will make you feel relaxed because in case those plugins did not work well, it will only affect your staging site, not the main one.
- 1 How To Create SiteGround Staging Environment
- 2 Step 1: Visit Site Tools
- 3 Step 2: Select The Domain
- 4 Step 3: Give Name To Your Staging Site
- 5 Step 4: Click On Login Panel
- 6 How Can You Manage Your Staging Website or Copy
- 7 In detail: Full and Custom Deploy of your Staging site
- 8 SiteGround Staging Not Working?
- 9 How To Create Staging Site Manually For Your WordPress Site
- 10 How To Create Staging Website Using Plugin Called Wp-Staging
- 11 How To Prevent Plugin Breaking Your Website
How To Create SiteGround Staging Environment
The steps are pretty clear and simple, follow these steps to have your first staging environment.
The SiteGround Staging tool is designed to provide their WordPress users with an easy enviorement where they test many things.
Here are the steps you need to take to have your first staging site.
Step 1: Visit Site Tools
You can easily access the staging tool by visiting your Site Tools. There you’ll find the staging option.
Right now, SiteGround is only offering a staging environment for WordPress users only. However, it is still possible to create a staging site for any website, but it requires some knowledge about FTP and MySql.
You will find a shortcut to the tool in your Site Tools > WordPress > Staging.
You can see in the picture how simple it is to find a staging tool. You just have to login into the dashboard, there under the WordPress section, it is easily visible.
Step 2: Select The Domain
Now, select the domain for which you want to create a staging site.
Step 3: Give Name To Your Staging Site
Siteground will ask you to give a name to your staging site. Once you name it, click on create.
Click on create
Step 4: Click On Login Panel
The steps are now finished. Click on the Login Panel option to get logged in to your staging site.
Important! To ensure the stability and optimal performance of our servers the following limitations apply when you create new copies of your site:
- The site database has to be under 2GB
- You must have under 500 tables in your database
- You must have more than 51% free space in your account
- You must have more than 20% free inodes in your account
- You can have up to 10 staging environments per account
- You can make up to 15 staging operations daily
- The Staging tool is also not compatible with WordPress Multisite at the moment
So, keep these points in mind before moving forward.
How Can You Manage Your Staging Website or Copy
If you want to edit or fix something that is not right, you can visit the manage section, where you will see options like Full/Custom Deploy, Destroy, Replicate, Log in to Admin Panel, and Rename.
To start managing your Staging website, first, you have to go to your Site Tools > WordPress > Staging. In it, you will see a list of all staging copies of your websites. Under Manage Staging Copies you can choose the preferred staging copy and go to the kebab menu (The kebab menu, also known as the three dots menu, and the three vertical dots menu, is an icon used to open a menu with additional options.).
Once you click on it you will see the following options below:
So, you can see the picture of how many options you are getting, and you can do the following actions with your staging copy:
*Full Deploy or Custom Deploy:
After making changes to your staging website, if it is looking good to you then you can replace your live site with it by clicking the option Full Deploy. It will take few minutes to replace your live site but once it is done, you’ll be able to see the changes on your live site which you had made on your staging copy.
*Destroy: By clicking the destroy option, you can erase all the changes you have done on the staging site, it will delete your staging site completely.
*Replicate: It is a different kind of option, it creates a copy of your staging copy, pretty weird, right? but it is useful when you have to test multiple things at the same time or if you don’t wanna change anything in the current staging site that you have created.
*Log in to Admin Panel: It works as a shortcut to the admin panel of your staging WordPress application. Shortcuts save time!
*Rename: With this option, you will be able to rename the staging site.
In detail: Full and Custom Deploy of your Staging site
In this tutorial, we gonna learn how you can deploy your staging site. It is an easy process and doesn’t require any kind of special knowledge. Just make sure to follow every step closely so the chances of error will be fewer.
There are two options to push your staging copy to your live site. In this tutorial, you will find detailed knowledge on how to use both ways for the best results.
First, let’s see how you can access the deployment options:
To find the deployment options, you just have to click Site Tools > WordPress > Staging, In it, you will see a list of all staging copies of your websites. Under Manage Staging Copies you can choose the preferred staging copy and go to the kebab menu. Click on that menu.
How To Use The Full Deploy Option
With just one click, you can change your live site with the staging one. You will be able to overwrite your staging copy over your live site, and that’s how easy it is. Also, both the files and the database of the live site will be replaced with the ones from your staging copy.
In case you don’t want to completely change your site, you can choose the custom deploy option instead. SiteGround provides you this cool feature where you can change only those things which you want to.
How To Use Custom Deploy Option
The thing that makes custom deploy so special is that it gives you the option to see the changes you have made. It will compare all changes you’ve made to the files and database of your staging copy with the current state of your live site. Pretty cool, right?
This option is valuable in many cases, for example: If you are using the like button option on your website, and you have many likes on your post and you don’t want to overwrite it, you can do this by custom deploy option. Another example, if your visitors have commented on some of your WordPress posts, you wouldn’t want to overwrite your _comments table.
This way of pushing your changes live provides you all the flexibility you want. It makes you feel in control of everything happening, and that makes you feel special.
Now, let’s look at the site elements you can select whether to be deployed to live or not:
*Things You Want To Be Added
All the directories and files will show to you so that you can select what exactly you want to push live. I suggest you leave some parts out because you don’t need to take everything live, you can cut some things out.
*Things You Want To Be Updated
if any database tables are modified you can t whether you want to push those changes you have made to the live website or not table by table you will be able to see.
*Things You Want To Be Deleted
If you want to delete anything, then select it and delete it, the file you have selected to delete will not go to the live website.
Important Point To Remember: Before you push your staging site to live, make sure to update the WordPress version of the staging site, because the changes may not visible if your staging site doesn’t have the updated version of WordPress.
If You Don’t Like It, You Can restore It To The Previous Version
A could produce good results for the website but if it isn’t doing well or you find something which is not right and causing the error to your site then you easily get your old site backup with some easy steps.
To restore your live site, go to your Site Tools > WordPress > Staging, under Manage Staging Copies > Backup. Simple solution.
You will get a list of all the backups which were created with the date and hour, and you can restore your site easily with those backups. After selecting the newest backup, click on Restore.
The picture above will guide you on which button you have to click to restore.
SiteGround Staging Not Working?
The possible reason behind this could be the WordPress version of your staging site. It should be updated, in case it is not then your staging environment may work or will show an error while running.
You can repeat the steps again to fix the issue if you have updated the WordPress version of the staging site and still facing issues. Also, you can contact their customer support, or you can raise a ticket by visiting their contact us section.
Make sure to create one staging site for your site because it is important, there are many plugins waiting to destroy your site, you can be safe by creating one today!
How To Create Staging Site Manually For Your WordPress Site
If you want more open space for your website where you can run codes and see how they are working then creating one manual staging site for your WordPress site would be a perfect idea. Even I have created on my site, and it does take time but it is worth it.
However, you need to have some sort of experience before trying this, if you are new then I would suggest creating a staging site using your host not manually. I am telling you this because it might break your site and that could be a worry if you don’t have any backups ready for your site.
Steps are clear but do require attention because it is about your site and you have to be careful about it. Also, it is important to create a subdomain before starting.
How To Create A Subdomain With The Help Of Your Host SiteGround
You have to login you to your SiteGround account and then have to access your site tools. To create a subdomain in Site Tools, go to Domain > Subdomains > Create New Subdomain. Type in the subdomain prefix under the field Name and click Create.
You can also create the subdomain using cPanel.
Adding a subdomain using cPanel is possible by going to cPanel home page > Subdomains tool. Under the section Create a Subdomain, you had to enter the subdomain prefix and then click Create.
Once you are done with the subdomain, now you have to have an FTP account for your subdomain. This will ensure everything is always kept separate.
To add new FTP accounts, go to your Site Tools > Site > FTP Accounts.
In the Create New FTP Account section of the page, you have to fill in all the fields.
- In The Account Name – The username of the new FTP account. “@yourdomainname.com“, where yourdomainname.com is the primary domain name of your account, will be added automatically after the username. For example, if you input Hosting, the full username will be [email protected];
- Password – the password for the new FTP account;
Once you input the details for the new FTP account, you can click on Create to create your FTP account.
Upload Your WordPress Files To Staging Site. To do that you have to know how to set up FTP perfectly. Watch the video below to get proper information.
Next, you’ll need to use that new FTP account to upload your site’s files.
First, download the latest version of WordPress from WordPress.org, and upload that, it is important to have the latest version of WordPress.
Then, you need to also copy over these three folders from your existing WordPress site:
Upload those to your staging site as well. If your folders are especially large, you might be able to use cPanel’s File Manager to speed up the process. Otherwise, FTP is totally fine. I personally use FTP – it just may take some time to run through large folders.
Export and Import New Database:
The next step is to export your live site’s database and import it to your staging site, and to do that, I suggest you install a plugin called WP Migrate DB, Activate and then run it by going to Tools → Migrate DB.
This plugin will automatically update all of the file paths in your database to point to your new staging site URL. This is absolutely essential to ensuring your staging site actually works, not fails. But make sure you enter the same directory path and URL that you used when you created your subdomain:
Now export the database, and move on to the next step.
Now, you have to create a new database for your staging site and import all of the data.
Here is how you can create a new MySQL database:
This very well made tutorial explains how to create a new MySQL user and database.
Go to Site Tools > Site > MySQL where you can create a MySQL user and a database easily and then assign the user to the database.
On the page that will open, go to the Databases tab. Click on Create Database. Keep in mind that the Database names are automatically generated.
The next thing you have to do is, click on the Users tab to create a new database user. Click on Create User. Keep in mind that they are automatic/system generated and once set you will receive a notice with the username and its password.
In order for a MySQL user to be used to manage a certain database, the user permissions for that database must be set. This should be done from the Manage Users area, go to the preferred username, and click on Add New Database.
On the page that will open, choose the desired privileges the user should have to the database and click on Confirm.
Then, go to PHPMyAdmin. Find the database you just created, and then click on Import, and choose the file that WP Migrate DB exported:
Then click Go to import your database data.
Edit the wp-config.php file to point to new database.
this the last step, You have to edit the wp-config.php file on your staging site to use your new database details and username.
Also, make sure the database prefix matches the one used on your live website. You probably will not need to change anything here, but it is possible depending on what prefix your live WordPress website uses.
If you’re editing the “wp-config-sample.php” file, make sure to rename it to just “wp-config.php”. Then upload it back to your server over FTP.
Try To Login And Restrict Access To Your WordPress Website
If you have done everything perfectly then you should be able to log in to your staging site using the exact same username and password as your live site.
And now, lets see how you restrict few things to make everything perfect.
First, go to Settings > Reading and choosing the Discourage search engines from indexing this site box. That will at least stop Google from indexing your staging website.
You can also install a plugin called Hide My Site If you want to restrict access even further.
Should You Push Changes To Your Live Site?
No, I don’t think so it is a good idea because you’re always risking something going wrong during the transition, and there’s literally a lot that could go wrong. For example, you might get just part of your changes deployed which means a crash site or some untested changes might get deployed too quickly which also means a crash site. Be careful.
How To Create Staging Website Using Plugin Called Wp-Staging
If you want a simpler way than manual staging creation then this could be the deal for you. Wp-Staging, a plugin that is popular to create a staging website in few minutes. Let’s see how you can create your first staging site using that plugin.
Go to the WordPress plugins section and search Wp-Staging or just staging, you’ll easily find out the plugin. Once you see it, click on install to install the plugin. Then, head to the WP Staging tab and click Create a new staging site.
Give your staging site a name (for example, “Test” or “staging” anything you like) and then click Start Cloning.
So now after doing these steps, just wait for some minutes because it might take some time to clone your whole website. till then be patient and let the plugin do its job.
Once it’s complete, you can access your staging website by following the prompt. You’ll need to log in with your same username. Then, you’re free to start testing! You’ll always be able to tell when you’re on your staging site by looking at the Yellow admin bar, it will always make you remember that you are in the staging area right now.
The job is done. You can do whatever you want to with your copy site. Here you can test some plugins that you have never tested before with ease. Also, no search engine will index your site, stay tension-free.
How To Prevent Plugin Breaking Your Website
As a WordPress site owner, you have probably installed multiple plugins, but did you know that for each plugin you downloaded you are at greater risk of having your website break. Plugins extend the functionality of your website and enable you to incorporate custom features, they do a lot of job for your website, but not all plugins may be suited for your website.
You may encounter the following issues mentioned below if you install plugins without testing them on staging site or if you fail to keep up with the ongoing WordPress updates:
- Some plugins may break during a WordPress update, causing errors or broken pages on your website, and that can give you a headache.
- Certain plugins may not be compatible with customized source code and could break your website, which could lead to loss of data.
- Plugins may have high resource usage, which can cause high server load and slow down your website, and that could hit your visitors.
It’s tough to diagnose if a plugin will break your site before installing and activating it. That is why make sure to test them on your staging site you have created.
However, I have put together this short list of primary steps to decrease the chances of your site falling victim to a faulty plugin.
Before you install a plugin:
- Check the number of active users on the plugin, the higher the better.
- Check the last update to the plugin, the newest update tells you the plugin is safe.
- Check the number of bugs that have been reported to the plugin’s developer, it is also important to check.
- If your hosting provider allows staging environments, you should install the plugin onto a staging site and make sure it runs smoothly. Like, I have said it multiple times.
By following these steps, you will never face such problems. We work on your site to make it the best, but these kinds of issues can be frustrating. Make your site better so it will never face such things in the future, ultimately you’ll feel better.
Thanks For Reading!