Thursday, September 8, 2022
HomeITTips on how to Backup WordPress Website Manually by way of SSH

Tips on how to Backup WordPress Website Manually by way of SSH





Commercial



In case you are operating a WordPress web site on a cloud server or a VPS, then you could have to take handbook backups for numerous causes. Whereas this text is just not the quickest to learn the information studying this information will assist you to to handle your server with out requiring you to put in any website hosting panel or PHPMyadmin. Earlier than taking a backup, you need to have a look at your MySQL database measurement. If the dimensions of database is simply too enormous then you could learn our this information.

As we all know, WordPress has two issues to take a backup of – the primary is the FTP information and the second is the MySQL database. One other factor you could take backup of is the SSL certificates. I’ll assume that :

  • In case you are utilizing a Home windows PC then you’ve configured Ubuntu Bash for Home windows, so that you’ll use Ubuntu Bash to SSH.
  • In case you are utilizing a Mac, then you’re utilizing iTerm2.
  • In case you are utilizing a Linux PC, then you’re utilizing the default terminal app of your OS.

You have already got one server’s WordPress (which you’ll take backup) with a area identify. One other server is required to take the backup (backup server). There are server backup server suppliers obtainable nowadays, you should use our favorite VPSDime. VPSDime doesn’t price an enormous monthly and the staffs are educated about managing Linux servers. In case you bought confused with one thing round a server, you possibly can even pay them to do the job for you. In case you are already utilizing VPSDime to host your web site, then use another website hosting for backup. The backup server and principal server shouldn’t be in the identical information heart (to reduce the prospect of exploit, downtime and many others).

 

Steps to Backup WordPress MySQL Database

 

Navigate to the foundation of the general public listing of the principle server, normally, we setup WordPress at /var/www/html :

You’ll get the MySQL database person identify and password from wp-config.php file. You possibly can instance the MySQL database:

It would present one thing just like the beneath:

You possibly can verify the tables:

You possibly can exit the MySQL interface by typing:

You possibly can take a backup of the MySQL database by typing:

As it’s a handbook backup, you possibly can restore this backup to check. You possibly can restore to MySQL server by typing:

You possibly can change the database identify on wp-config.php file to verify whether or not the backup is working. It’s a sturdy, foolproof technique, though it consumes a while. You possibly can drop any of the databases you need:

Now, from the backup server, you possibly can wget the SQL backup:

DO NOT neglect to delete the SQL backup from the principle server :

However doing the above by way of SSH day by day is just not sensible for many site owners. Contemplate automating by utilizing a bash script or utilizing MySQL Workbench.

How to Backup WordPress Site Manually via SSH

 

Steps to Backup WordPress FTP

 

As the dimensions of FTP information is commonly giant, we have to verify the house obtainable on the server and the dimensions of the FTP information.

Now make a tarball of the entire FTP :

Now out of your backup server, wget the tarball:

Though it’s hardly ever required (until you need to transfer the server), you possibly can untar by operating:

Once more, you possibly can automate this course of by utilizing a bash script or you possibly can combine GitHub together with your occasion.

 

Conclusion

 

Taking common backup is of utmost significance. I’ll recommend you continuously obtain the backups in your native laptop too and perhaps, you possibly can write them on an optical drive, SD card and many others. A backup server makes the method quick however having a backup in “hand” provides a sense of psychological peace.

Though this text is greater to learn, this may extraordinarily assist you to in case you need to migrate from one server to a different.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments