Latest "File management" files
Workshop » Reference Section » Grimoires » IT » Platforms » Linux » Packages » rsync & rsnapshot

How to backup a WordPress site via SSH

To make a complete local backup of a remote WordPress install over SSH, you need to perform two distinct steps:

  1. Download the files (using rsync).
  2. Export and download the database (using mysqldump piped through ssh).

Here is the step-by-step guide.

Prerequisites
  • SSH Access: You need the username, host (IP or domain), and password (or SSH key) for the remote server.
  • WordPress Path: You need to know where WordPress is installed (e.g., /var/www/html or /home/user/public_html).
  • Database Credentials: You will need the database name, user, and password. (I will show you how to find these below).
Step 1: Find Database Credentials (Optional)

If you don't know your database login details, run this command to read them from your remote wp-config.php file: ssh user@remote-server.com "cat /path/to/wordpress/wp-config.php" | grep 'DB_'

Note the DB_NAME, DB_USER, and DB_PASSWORD for Step 2.

Step 2: Download the Database (SQL Dump)…
Workshop » Reference Section » Grimoires » IT » Platforms » Linux » File management

Directory and File Locations particular to this server

PHP config -
Includes:
- opcache settings
- error warnings

PHP slow log setup is in

PHP log -

PHP error and slow logs by pool are in