Staging Environment for a WordPress Site
by N HOST BD
I never thought that I would start a post about web hosting by quoting my grandmother, but here she goes, as she says: “Of the brave the cemetery is full.” Okay, she does not have the slightest idea about hostings, but like the famous proverb, she has a lot of common sense. So, if you understood what a test environment is, I would tell you: “Carinyo, use one is better safe than sorry!”
One first thing you learns when working with websites is that things can go wrong, very poorly and from grapes to pears they go well. Therefore, it’s good to have systems to protect the work developed, especially if it already has been published.
Having a good backup system can save you the day, the week or even your job. But in this section, I want to focus on the protection of web development, and for that, there are test environments (in English staging area), these allow a secure development. With them, you can test changes to an exact copy of your website before publishing them. It must be said that this option is available in very few hostings.
But what the bad is this about the testing environment?
It is a solution that allows you to generate an exact copy of your website quickly. This replica of your website is hosted on the same server, so you use the same technological environment (e.g., PHP or MySQL version) as on your main website.
Once the test environment activated, you can make changes (e.g., the update of plugins) to see how they affect the copy of the website, so if something goes wrong, you do not jeopardize the project already launched. The added value of a test environment is that it takes a few clicks to create and maintain it. Also, being a solution that is on the same hosting as the main website, making copies and posting changes is fast and easy.
Who aimed it?
As you can imagine, this solution doesn’t address everyone. If you do not have to do constant updating of plug-ins (e.g., plugins) or necessary modifications in the usual way you will not need a staging. An efficient backup system should be sufficient.
To give you an idea, of the four websites I’m involved in professionally, we only use one test environment in one. The rest are not large enough; its maintenance is simpler. Of course, I do not even want to imagine what it would be like to not use a staging for our most important project, how scary!
What are its advantages and disadvantages?
The truth is that almost all are benefits and I can not think of a situation where a testing environment can hurt a website.
We have commented some of the advantages above, but give a more detailed review:
- Testing the site in the same technological environment in which it will be hosted ensures full compatibility when it comes to publishing the project or its updates. For example, there will be no conflicts with PHP versions.
- The process for creating a test environment is high-speed, in a matter of seconds it will be ready.
- You can forget extra complications when making changes to your website. For example, it does not require transmission of files via FTP or create and import copies of databases. With a simple click, all changes will be launched immediately.
- Being an integrated solution in your hosting, there is usually a system of built-in backups to be able to reverse the changes if they generated a problem. Still, it’s good to make your backups before launching any changes.
- The only disadvantage I can think of is: Hiring a hosting with staging is significantly more expensive, this is usually considered a premium feature.
Ok, I want a test environment, what hosting use?
I have tried quite a few hostings in my life and to be honest I have found very few that have to stage. Also, these have always had prices and quality above average.
WP Engine, the referent WordPress
If you use WordPress, you may have heard of WP Engine, this is one of the most reliable WordPress hostings. In fact, they only work with WordPress, if you wanted to host a Drupal or Joomla with them you could not. Among many other options have a testing environment (call it staging) integrated with your hosting.
They have servers in Europe (United Kingdom) and in the United States. It must be said that it is an expensive hosting because it is aimed at medium and large projects, but it works wonderfully. Keep in mind that they only offer your hosting and support in English, so if you plan to hire them, get ready to bring up your English.
Is there an alternative and free method?
First ask yourself if you need a testing environment, because the process will not be so easy. Then follow these steps:
- Create a subdomain where you will host your test site. For example www.blog.thenhost.com
- Install in the test subdomain the CMS (e.g., WordPress or Joomla) that you use on your main site.
- Create a copy of your main website. This process will change depending on the content manager you use.
- Move this copy to your test subdomain. This step is different in the different content managers (CMS).
- Use the copy of the website in the subdomain as the test environment. Make all the developments you need.
- When you are ready to move the test environment to the main site, apply steps 3 and 4 in reverse.
(a) Create a copy of the test environment
(b) Migrate that copy of the test environment on your main website
- Make sure the migration went well.
Keep in mind that this requires some level of knowledge, if you do not do the process well, you can damage your project. That’s why, if you throw yourself into the pool, have recent backups on hand.
A test environment will be very useful for projects that make constant development updates. If you do not find yourself in this situation, surely a testing environment is not for you, as these are not cheap. Having a good backup strategy will suffice.
But if you’re going to use it, a testing environment, it can be your best ally when it comes to developing projects safely.
November 21, 2018
June 29, 2017
June 28, 2017