WordPress - MySQL Database Export & WP-CLI Import

# Export MySQL sudo mysqldump -u root -pPASSWORD DBNAME > filename.sql # Import WP-CLI wp db import filename.sql : ' ---------------------------------- At this point you might want to search and replace your database ' # --dry-run will show you what is going to change wp search-replace "old-site.com" "new-site.dev" --skip-columns=guid --dry-run # run to fix file locations wp search-replace "old-site.com" "new-site.dev" --skip-columns=guid # make sure you have the theme that is expected - activate it if not wp theme status # kill any transients and let them rebuild on your new site wp transient delete-all #flush the rewrite rules wp rewrite flush

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.