Welcome to WebmasterWorld Guest from 3.228.24.192

Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Wordpress staging solutions

wordpress staging live development

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

Junior Member

10+ Year Member

joined:Dec 21, 2001
posts: 115
votes: 0


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!
4:15 pm on May 23, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8639
votes: 283


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.