I'm setting up a new CiviCRM and web site on WordPress. I'm used to working on dev/staging sites and pushing changes to production after they are tested and approved. What's the best way to do this with CiviCRM on WordPress? Here's what I would do without any advice:


  1. Install WordPress and CiviCRM fresh on the production site.
  2. Make a complete copy of the filesystem and database to create a staging site
  3. Globally replace domain names in WP and CiviCRM files and DB tables, using guidance from the docs and this answer.


At this point, should staff use CiviCRM in production, or on staging? I think WordPress changes should be made on staging, and pushed to production. Maybe CiviCRM changes should be made in production and synced to staging? Should everything be done on staging, and then deployed by reversing the Setup steps?

2 Answers 2


Staff changes should happen on the live server. This is doubly true if you have any public-facing pages, which will mean the database on the live server is updated by members of the public.

Traditionally, code travels from dev to staging to prod. Data travels from live to dev/staging.

I prefer referring to "dev/test/live" server, since this better illustrates the flow, and is less jargon-y to non-tech staff.

Some changes don't flow well this way - for instance, you may want to create a contribution page on your test server, then transfer it to live. In practice, this should be relatively infrequent, and you can redo your work on the live server.


Key is configuration...

I do a straight file copy (can use git as well to deploy with a CI if you want...).

Important files are configuration... you can set your location dependent settings in


Wordpress is wordpress... so moving the wordpress part is pretty well documented. The database side is straight forward with Civi... just copy the database (re-import) ... the settings are in the settings file.

I save the settings file, copy the entire site, replace the settings file... then manage the URLs ... then bob's your uncle... You could automate it somewhat with git and a CI if you prefer, but it is so simple I just hack at it at the command line...

Hope this helps.

  • Thank you. My upvote should appear here as soon as my reputation allows it. :)
    – asciimo
    Nov 7, 2017 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.