Easy Peasy Guide: Backup WordPress Site in SSH

Open SSH, Of course

Copy paste the line below

mysqldump -u USER -pPASSWORD DATABASENAME > mydb.sql

Change the DATABASENAME to your own database name, USER to your username, and PASSWORD with your password.

Note: There will be no space between “p” and PASSWORD.

Now yor database is exported. Move it to the website folder and download it offline, or wget to another server.

Next we need to make a copy of your website files.

Paste the following line and that’s it:

Go to website folder and paste the following command

zip -r wpsite.zip .

Now download the wpsite.zip file.

We are done now. Go sleep now. Bye!

Leave a Comment