Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Wordpress staging solutions

wordpress staging live development

         

meannate

12:02 am on May 23, 2017 (gmt 0)

10+ Year Member



Hello,

We're presently using a solution called WP Stagecoach and have been having quite a lot of issues with "automatically" syncing our staging site to the live host. Typically we run a manual sync which involves creating a large SQL dump and differential file dump. Lately, it seems as though certain files never get updated and we're desperately searching for a more comprehensive solution.

Is there a standard procedure for pushing changes from a development "staging" server to a "live" server?

Thanks!

ergophobe

4:15 pm on May 23, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Wordpress is simply not designed for professional development workflow in my opinion. It litters the database with URLs and (why, oh why Wordpress?) absolute URLs. Which I assume is where most of your problems are coming from.

So a few things you can do to ease the pain.

1. Find hosting that provides a staging environment. I've never actually done this, but I think WPEngine and Siteground and probably 100 others provide this.

2. Use your wp-config to the max to override settings in your dev environment. The key is this becomes a custom file that you add to your .gitignore and if you do have changes you want shared, you port them manually, or you have include files that get included based on environment. See my comments in these threads
[webmasterworld.com...]
[webmasterworld.com...]

3. Change your DNS. Create a batch file that changes your local hosts file and during dev, you run the batch file and point example.com to localhost. Now all domains resolve exactly the same and if your environments match, the site never "knows" it's a problem.

The thing about #3 is that it's easy to get confused and think you're on the live site when you're on dev or staging. I find it confusing, but it is the most solid way to handle it.