{"id":446,"date":"2013-04-11T10:40:28","date_gmt":"2013-04-11T08:40:28","guid":{"rendered":"https:\/\/wprealm.com\/?p=446"},"modified":"2019-07-06T12:16:41","modified_gmt":"2019-07-06T10:16:41","slug":"wordpress-and-dtap","status":"publish","type":"tutorial","link":"http:\/\/wprealm.local\/tutorial\/wordpress-and-dtap\/","title":{"rendered":"WordPress and DTAP"},"content":{"rendered":"\n

Many companies I know use DTAP in their website development process. DTAP is an acronym for “D<\/strong>evelopment, T<\/strong>esting, A<\/strong>cceptance and P<\/strong>roduction” and is used as a release management cycle in software development. If you are building complex websites \u2013 or rebuilding them – the use of a so called “DTAP street” is very useful. Over the past few years I’ve been working a lot with DTAP and WordPress, of course. Here’s my experiences and the choices I made.<\/p>\n\n\n\n

A DTAP street<\/h3>\n\n\n\n

Using a DTAP street is all about managing the development and release of entirely new software or just for a newer release of the software already in production. When using a DTAP street in web development you are in fact using at least four environments and versions\/copies of your website:
<\/p>\n\n\n\n\n\n\n\n

\"\"<\/figure>\n\n\n\n
  • Development<\/strong> \u2014 (for example, http:\/\/projectname.development<\/strong>.companyname.com<\/em>)
    This is a true developers’ environment and the place where the actual code is written. Are more developers working simultaneously on the same project? If so, you can have several simultaneous development environments. Just use SVN of Git for version control and for merging code. The main purpose of this environment is to implement the code which can be tested by the developer himself.<\/li>
  • Testing<\/strong> \u2014 (for example, http:\/\/projectname.testing<\/strong>.companyname.com<\/em>)
    The test environment is the next station for new code. Here, a tester (an interaction designer, for instance), tests the product and checks whether it works according to specifications; for this reason, this person should preferably not be the same person who wrote the code.<\/li>
  • Acceptance <\/strong>\u2014 (for example, http:\/\/projectname.acceptance<\/strong>.companyname.com<\/em>)
    It should be fully identical to the production environment, and even run on the same server. All integrations with back end systems, third party systems and cache systems (and settings) should match the live website. This environment is often used to perform tests prior to taking the software into production. This too, is the station where your customer \u2018accepts’ the changes; in other words, it serves as the customer’s test environment as well.<\/li>
  • Production <\/strong> \u2014 (for example, http:\/\/projectname.com<\/em>)
    The production environment is your actual live website, to be used by your customer and his visitors. The main difference with acceptance is that there is no room for error here, and there should be no downtime.<\/li><\/ul>\n\n\n\n

    One codebase to rule them all<\/h3>\n\n\n\n

    Working with WordPress under DTAP means that you will have to run four separate installs of WordPress for every project and also running four databases. I’ve tried using fewer databases than four, for example using one database for development and testing; it really does not work well, since WordPress uses absolute URIs for your assets like Javascripts and CSS, and user generated content, such as images inside posts, will be scattered all over the place. Hence, I strongly recommend that you use a separate database for each install.<\/p>\n\n\n\n

    I want to keep my code completely portable between these environments; I hate deploying a site to another environment and have to fill out new database credentials in the wp-config.php<\/code> or in any other setting. Since you are bound to forget it at some point, I use this simple code fragment in my wp-config.php<\/code> for my (database) settings.<\/p>\n\n\n\n

    \n\n
    \n
    \n
    \n
    \n
    \n \n
    \n\n \n
    \n\n