WordPress (Old Notes)

Backup Files

I had no good plan for backing up and restoring WordPress files. Try one of the following:


Find your FTP login details and log into your server.

Identify the folder containing your WordPress site e.g. public_html.


Depending on your site, you could download the whole of the site folder or just the wp-content folder and the wp-config.php settings file.

Use lftp to mirror the folder to your cloud server. You may need to install lftp`:

apt install lftp


The mirror_remote_directory_to_local_directory script works very well (copy in the misc folder for our customer). Remember to update your user name, password, host name and folder.


If you prefer not to use lftp, then wget should work:

wget -r -l 0 --ftp-user="user@name.co.uk" --ftp-password=abcdefgh ftp://72.720.72.72/public_html/*


My user name was an email address. Using the separate parameters allows us to enclose this in double quotes.


If you ask cPanel to create a Backup in the root folder, download it:

wget ftp://72.720.72.72/backup-10.25.2021_09-04-06_abcdef.tar.gz --ftp-user=user@name.co.uk --ftp-password=abcdefgh


If you use the UpdraftPlus plugin, Backup Now, make sure to Include your files in the backup and Send this backup to remote storage