thanks to Abraham Wiebe from unsplash.

A Bad Start

Test site and production site, for no developers. 

Today we are gonna talk about Golmap, the journey of a little startup.. and his bad start.

We have almost 8 clients, testing or site, there are more things to work on.. and, for my heaters developers, we don't have a test site.

Before to go on, for my no-developers friends, what is a test site, and why is this so important?. Well imagine a website like a software, in fact it is a software, so it have a lot of code, it could be php files or css files, even images or any resources consumed by the website. So in every new version of the website the actual code will change, will be updated. 

A test site is a website, where you are going to test your site, or like Spanish people said: “Darle caña”, hit it, make it bleed. Yeah, maybe a little rude, but it is preferable to do it there, than in your production site.

Now imagine a production site, i mean a site who is working already and have a couple of visit per day. Yes you can send a note with “we are working” and leave the website in standby for 30 minutes, make the changes and put it online again. But trust me… this is classic… almost always, maybe a 99% of the times, you will find something wrong. Something who is not in the right place.

Let’s make it easier, the advantages that you will find for work with differents environments:

  • Back up.

    • If you make an update, and want to see how your visitors interact with it, there will be two different situations, they will love it or hate it. In the second case, with a test environment, there is a backup of the code, particularly if you are using git for the bridge between the developments sites, i will explain this point later. So, you can go back to the code that your users love, and in seconds, everything can be the same. 

  • Test your site.

    • In almost all the cases, there are sites maintained by different persons, all of them use the site in one way or another. It’s impossible for you, like the developer of the site, test the site in 100%, with all the functionalities. Because it is not about make something in the site, and leave it working… a good development is adapted to the user, and you, developer, you are not the user. So, use that user for test you site, get some feedback and if everything goes well, put it online. 

  • Be online, 24/7.

    • Make changes in productions is suicide, it’s a sin. Every time you do that a kitten dies. Sad, right?. So, the less bad thing to do is, put the site in: “we are working”, and then make the changes. But the bad new about that is the time of your site offline, which means less money. In almost all the cases synchronizing your production site with your test site, just take a simple command line. Git Pull, maybe clear cache of your site, and then.. done, site ready.. that is nothing of time, forget the time for “testing” because the testing was in the other environment


Okey, now imagine an startup working, with a couple of possible clients testing the website, applying the idea of mvp from Eric Ries, but with a clear idea of what the product is, and more important, risky and stupid, using the brand, using the name of “Golmap” for all that.. Without a test environment site. Yes, that is what i did. 

How everything ends. Well, we made the updates at the right time, in the front of the client, he looks happy, and we also. I didn’t detect the problem. Simple access to the server using ssh, with our friend drush, downloading modules and enabling them, in a blink, the client see all the changes in the production site.. i didn’t detect the problem.

Come on class, make a stop, and let’s think about how bad all this could end, what was the problem that i didn't detect?

Easy right?

There was the typical: “move this here”, and the next day “oh, no, just put it back”. Or, with my partner, “hey Josué, where is the functionality of the other day, i need to change the slider, by the end of the day”. And an email saying, “for the weekend Golmap will work in the payment process, sorry for the inconvenience”.

Yes, it took us a weekend to fix it. In simple words, there wasn't a command + z (ctrl + z) to go back and set the site how it was. 

Anything that can go wrong, will go wrong.

How to fix it?, let’s make a test environment from the production site. Usually the workflow start from your localhost, but now i have to do it from my server, copy it and send it to a test server, and at the end to my localhost, and give access to all my developers. 

So, i will make a tutorial about what i did, you can find it here. 

All the project was made by working on the server. That reduce the development times, and if is just one developer is the heaven for him. But in long terms is a problem for everybody, it can increase the risk, complicate the participation of more developers, don't have a backup, don't have defined process, and more. 

So, that is all, i hope this can help to anyone why is so important invest in a test site.