Plugin Directory

Opened 3 years ago

Last modified 3 years ago

#2400 assigned enhancement

Maintain environment relative links on sync

Reported by: jherter Owned by: tamlyn
Priority: high Severity: minor
Plugin: not-listed Keywords: database sync


I have modified your plugin a bit to accommodate multiple environments.

My mod replaces URLs in the SQL dump to maintain site functionality and QA ability.

from dev.site.com if you pull from staging.site.com all of the post links will point to staging.site.com which is undesirable.
from dev.site.com if you push to staging.site.com all of the post links on staging will then point to dev which is also undesirable. etc.

I have attached the file I have modified, note the comments maintain site links
There is one caveat, each environment must contain a variable with the site url like so,

$_ENV['SITE_URL'] = 'dev.site.com';

I use this with AWS Elastic Beanstalk and RDS

Attachments (1)

database-sync.php (7.4 KB) - added by jherter 3 years ago.

Download all attachments as: .zip

Change History (2)

@jherter3 years ago

comment:1 @tamlyn3 years ago

  • Status changed from new to assigned

Nice one! I'll get this added in the next few weeks. FYI, we're also on GitHub https://github.com/tamlyn/database-sync

Note: See TracTickets for help on using tickets.