Wp search-replace $(wp option get siteurl) (e.g., or ) Wp db import wp-database-new.sql OR -u -p < wp-database-new.sql (e.g., /Applications/MAMP/Library/bin/mysql) Import wp-database-new.sql file into local database:.Mv wp-content wp-content-old & mv wp-content-new wp-content Wp db drop wp db create OR drop/create via phpMyAdmin Mv wp-config.php wp-config-new.php & mv wp-config-old.php wp-config.php Mv wp-config.php wp-config-old.php & mv wp-config-new.php wp-config.php Update DB_NAME, DB_USER, and DB_PASSWORD (and verify $table_prefix) (be certain to update DB_NAME, e.g., database-XXXX-XX-XX)Ĭontrol + O (to save), control + X (to exit) Scp WordPress Path]/ (obtain from web host e.g., (drag Desktop from Finder to Terminal to get path or ~/Desktop)ĭouble-click file on Desktop to unzip folderĭouble-click wp-database-`date +%F`. file to unzip databaseĪdd suffix -new to each item’s file/folder nameĭrag wp-content-new and wp-database-new.sql to local WordPress folder Download production my-wp-backups folder:.Tar -czvf my-wp-backups/wp-database-`date +%F`. wp-database.sqlĬd (e.g., cd html) u -p -opt > wp-database.sql (e.g., /Applications/MAMP/Library/bin/mysqldump) (see local wp-config.php file for DB_USER, DB_NAME, and DB_PASSWORD) Mkdir -p my-wp-backups & tar -czvf my-wp-backups/wp-content-`date +%F`.tar.gz wp-contentĬp wp-config.php my-wp-backups/wp-config-`date +%F`.php First: Back upĬd (drag WordPress folder from Finder to Terminal to get path) This is the converse of slash companion to this guide.įinalize everything in your live production environment (by adding, removing, editing, and updating plugins, themes, WordPress, content, etc.) before proceeding.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |