Make a ‘backup’ of WordPress site from terminal

Inside the wp-content folder:

wp db export ../backup_db.sql

And run this from outside the www folder:

tar -zcvf www_files_backup.tar.gz www

Leave a Reply

Your email address will not be published. Required fields are marked *