Manage with wp-cli
Summary: All Seravo sites come with wp-cli preinstalled and configured for easier commandline management.
You can use wp-cli in Vagrant box and Production. Just run this to see all commands:
$ wp --help
Note: You can call
wpcommand anywhere without
--pathparameter because the environment handles paths for you.
More information about wp-cli can be found in wp-cli.org
Database export/import (dumping db)
# Dumps the database to a provided filename $ wp db export your-dump-filename.sql # Imports the dump file from file $ wp db import your-dump-filename.sql
This creates new administrator user ‘admin’ with password ‘admin’:
$ wp user create admin email@example.com --user_role=administrator --user_pass=admin
Search-Replace database contents
After you have pulled database from production it’s useful to regex replace urls:
$ wp search-replace http://original.com http://original.dev