-
Notifications
You must be signed in to change notification settings - Fork 3
List of useful CLI commands
- run
wp core download
to install wordpress (or even betterwp core install
) - run
composer install
to install any required plugins/themes (composer update
it's also fine).
- “Wordpress”:
wp update core
-
“Another update is currently in progress”:
wp option delete core_updater.lock
- for a MAMP installation use:
mysql --host=127.0.0.1 -uroot -proot
SHOW DATABASES;
-
CREATE DATABASE my_new_db_name;
(to delete a DB:DROP DATABASE my_db_name;
)
exit;
mysql --host=127.0.0.1 -uroot -proot -e "CREATE DATABASE my_new_db_name;";
wp plugin install all-in-one-wp-migration --activate
(You must reload the page once before continuing)
wp ai1wm backup --exclude-media --exclude-themes --exclude-inactive-themes --exclude-muplugins --exclude-plugins --exclude-inactive-plugins --exclude-cache
Suggested: use "rsync"
to sync media files.
-
cd wp-content/ai1wm-backups/
(go to backup directory) ormkdir wp-content/ai1wm-backups/
(create if does not exist) -
wget http://example.com/wp-content/ai1wm-backups/backup-name.wpress
(download the backup) -
wp ai1wm restore backup-name.wpress
(restore from the backup)Remember: backup file must be located in the "ai1wm-backups" directory.
-
wp rewrite flush
(flush permalinks, do it once or twice if you encounter problems) -
rm backup-name.wpress
(remember to delete the backup file from the source as well)