Creative Commons Site Reliability Engineering WordPress Data Pull
⚠️ Destroys and replaces destination data
The Creative Commons team is committed to fostering a welcoming community. This project and all other Creative Commons open source projects are governed by our Code of Conduct. Please report unacceptable behavior to conduct@creativecommons.org per our reporting guidelines.
See CONTRIBUTING.md
.
DEST_HOST
:- Web hosting and WordPress are configured independently (ex. by
SaltStack)
wp-config.php
is already setup- user has appopriate permissions (ex. member of
www-data
) - WP-CLI is already installed
- You may need to configure your users
.ssh/config
. For example,chapters_stage
requires the following entry:Host 10.22.10.14 ProxyJump 10.22.10.10
- Web hosting and WordPress are configured independently (ex. by
SaltStack)
SOURCE_HOST
:- WordPress source data was created using /states/wordpress/files/backup_wordpress.sh found in the creativecommons/sre-salt-prime repository.
SOURCE_HOST
: (optional)- run
backup_wordpress.sh
on the
- run
- Local/laptop:
- Clone this repository
- Prepare configuration file
- Make a copy of one of the appropriate
config_examples/
- Replace
FILEPATH
andUSERNAME
with your information - Ensure
SOURCE_DB_FILE
andSOURCE_UPLOADS_FILE
are valid files on theSOURCE_HOST
.
- Make a copy of one of the appropriate
- Execute script with config file as only argument. For example:
./wp-pull.sh chapters__stage
(Only documenting CLI utitilities here. There are also many WordPress plugins devoted to migrating, mirroring, and syncing.)
- jplew/SyncDB: Bash script meant to take the tedium out of deploying and updating database-driven (eg Wordpress) websites. It rapidly synchronizes local and remote versions of a MySQL database, performs the necessary search and replace queries, then synchronizes all your uploads/binaries.