O'Reilly logo

WordPress Responsive Theme Design by Dejan Markovic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Multiple wp-config.php sets

As we want to test our code in as many different environments as we can, I recommend that you code and test in two environments: local (XAMPP on Windows) and dev server (Linux/Centos). Because of this, we have to have two different wp-config.php solutions as our credentials are different on different servers (and yours should be too). For this purpose, I am using a wordpress-multi-env-config setup that can be downloaded from https://github.com/studio24/wordpress-multi-env-config. Although this approach has a number of files, it's very easy to set up. In our setup, we should use:

  • wp-config.php
  • wp-config.env.php
  • wp-config.development.php
  • wp-config.staging.php

In wp-config.php, we should comment out:

// Define WordPress Site ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required