Skip to content
Creative Commons Site Reliability Engineering WordPress Data Pull
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
bin
config_examples
.cc-metadata.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
wp-pull.sh

README.md

sre-wp-pull

Creative Commons Site Reliability Engineering WordPress Data Pull

⚠️ Destroys and replaces destination data

Code of Conduct

CODE_OF_CONDUCT.md:

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.

Contributing

See CONTRIBUTING.md.

Assumptions

  1. Destination web hosting and WordPress are configured independently (ex. by SaltStack)
    • wp-config.php is already setup
    • user is a member of www-data
    • WP-CLI is installed on the destination host
  2. WordPress source data was created using /states/wordpress/files/backup_wordpress.sh found in the creativecommons/sre-salt-prime repository.

Use

  1. Optionally, run backup_wordpress.sh on the source host
  2. Clone this repository
  3. Make a copy of one of the appropriate config_examples/ and replace FILEPATH and USERNAME
  4. Execute script with config file as only argument. For example:
    ./wp-pull.sh chapters__stage

Alternatives

(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.

License

You can’t perform that action at this time.