Support » Fixing WordPress » WordPress in production with git

  • _


    I was trying to figure out to achieve a development process I have in mind. That’s my scenario:

    There’s a server that holds all the WordPress developed sites under git repositories, these sites are properly configured through wp-config.php and with their databases already installed and running.

    I want all developers to be able to modify these files without changing these configurations (wp-config + paths in database). I mean, cloning and pushing the sites in their local servers and have both working.

    For that, I still need the local and remote servers to connect to the same database on the remote machine, so the main problem are the paths. How can I make it work as WordPress holds its web path in a database field, and also refers to the ABSPATH constant in wp-config.php?

Viewing 1 replies (of 1 total)
  • Hi, I do not understand your scenario – you do NOT want the database connection strings to be changed to local databases? If this is right, then maybe this could be more easily achieved via local dns server or hosts files – another nice trick could be tunneling the remote database port via ssh to local developer machines, so “localhost” as a DB_HOST is always valid and never haas to be changed at all.

    Would be interesting to read more about your development environment!

    Did you implement a sane staging / deployment process with migrations and rollback?

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress in production with git’ is closed to new replies.