How to Back up and Restore a WordPress Website Using MARS?
Overview
Backing up your WordPress website is likely a crucial component of your business's data protection strategy. However, the typical backup solution can often be complex, time consuming, and costly. And using the backup services of a typical WordPress hosting provider comes with its own risks such as data corruption, cyber-attacks, or sudden termination of business. QNAP's MARS (Multi-Application Recovery Service) is designed to help you overcome these obstacles by offering a permanent, safe, and simple backup solution. This tutorial will guide you through the process of backing up and restoring your WordPress website using MARS.
How to Backup a WordPress Website
To backup a WordPress website, perform the following steps:
- Create a WordPress service for the WordPress website:
- Install the QNAP NAS Backup plugin in WordPress.
For details, see Installing QNAP NAS Backup in WordPress. - Obtain the WordPress access key.
For details, see Obtaining the WordPress Access Key. - Create a WordPress service.
For details, see Creating a WordPress Service.
- Install the QNAP NAS Backup plugin in WordPress.
- Create a backup job for the WordPress service.
The backup job can be run manually or by schedule. For details, see Creating a Backup Job.
Installing QNAP NAS Backup in WordPress
The QNAP NAS Backup plugin for WordPress allows you to run WordPress backup and restore jobs in MARS, and also allows you to view MARS job records in WordPress.
- Log in to WordPress with an administrator account.
- Go to Plugins > Add New.
- Enter QNAP NAS Backup in the search bar.
The QNAP NAS Backup should appear in the search results.
- Click Install Now.
- Click Activate.
The WordPress plugin QNAP NAS Backup is installed.
Obtaining the WordPress Access Key
MARS requires an access key from WordPress to create a WordPress service. The access key is generated by the QNAP NAS Backup plugin.

- Go to QNAP Backup.
- Next to Access key, click Copy.
The access key is copied to your clipboard.
Creating a WordPress Service
A WordPress service allows MARS to back up or restore an entire WordPress application (including all themes and plugins) or only the database used by a WordPress application.
- Open MARS.
- Go to Application > WordPress.
- Click Add Service.
The Add Service window appears.
- Specify the following information:
- Service name
- Host URL
- QNAP NAS Backup access key
- Click Verify.
MARS verifies the target WordPress application is accessible using the QNAP NAS Backup access key.
- Click Apply.
The WordPress service is created and appears in the service list.
Creating a Backup Job
- Go to Backup.
- Click Create backup job.
The Create Backup Job window appears.
- Under Job information, specify the job information.
Field
Action
Service type
Select WordPress.
Job name
Specify the job name.
The job name must be between 1 and 32 characters.
Description (optional)
Specify a description.
The description can contain up to 100 characters.
- Under Source and Destination, specify the source application to back up.
- Under Source, click Browse.
- Select a service, and then click Select.
- Under Source and Destination, specify the backup destination folder.
- Under Destination, click Browse.
- Select a backup destination backup folder, and then click Select.TipTo create a new destination folder, click Add Folder.
- Under Back Up Component, specify the source application components to back up:
Choose one of the following:
- All (WordPress file and database)
- WordPress file
- Database
- Under Backup Schedule, specify a backup schedule:
Schedule Type
Description
Manual
Runs only when a user starts the job.
Run once after
Runs the job after a linked job finishes running.
WarningIf the linked job fails, the job will not run.- Click Select a linked job.
- Choose a linked job.
Run by schedule
Runs the job on a repeating schedule.
- Choose one of the following and specify the relevant information:
- One-time: Specify the date and time.
- Daily: Specify the time.
- Weekly: Specify the time and days of the week.
- Monthly: Specify the time and the days of the month.
- Periodic: Specify the date, time, and wait interval. A job with a periodic schedule runs on the date and time specified, then runs recurrently every wait interval. For example, if the wait interval is 2 hours then the job runs every two hours after its initial run.
- Optional: Select Set end time and specify a date and time for terminating the job schedule.
- Click Apply.
A schedule is created and appears in the schedule list.
- Optional: Enable version management.
- Select Enable backup version retention policy for multiple backups.
- Under Retention Policychose one of the following:
- Retained days: Every backup is saved to the destination folder for the specified number of days and then deleted afterwards.
- Retained versions: Only a specified number of versions are saved to the destination folder. When the number is reached, the newest version replaces the oldest version.
- Under Threshold, specify a number corresponding to the number of days or versions retained.
- Click Apply or Back Up Now.
The backup job is created.
If you clicked Back Up Now, the backup job runs immediately.
How to Restore a WordPress Website
To restore a WordPress website, perform the following steps:
- Optional: Increase the file upload size limit.
For details, see Increasing the File Upload Size Limit. - Create a restore job.
For details, see Creating a Restore Job.
Increasing the File Upload Size Limit
In order to successfully back up or restore large WordPress applications that contain many plugins, themes, or databases, you may need to increase the file upload size limit.
- Open a Secure Shell (SSH) connection to your QNAP NAS.
- Enter the following commands in the terminal depending on the type of WordPress application and the version of Container Station installed on your QNAP device:WarningTo allow WordPress to process larger file transfers, the following commands also increase the PHP RAM usage limit and the PHP script execution time limit.
A native WordPress application
Container Station Version Commands 3.x cat <<EOF >> /proc/`system-docker inspect -f '{{.State.Pid}}' wordpress-wordpress-1`/root/var/www/html/WordPress/.htaccess php_value upload_max_filesize 1280M php_value post_max_size 1280M php_value memory_limit 2560M php_value max_execution_time 3000 php_value max_input_time 3000 EOF
2.x cat <<EOF >> /proc/`system-docker inspect -f '{{.State.Pid}}' wordpress_wordpress_1`/root/var/www/html/WordPress/.htaccess php_value upload_max_filesize 1280M php_value post_max_size 1280M php_value memory_limit 2560M php_value max_execution_time 3000 php_value max_input_time 3000 EOF
Your terminal will look like the following (Container Station v3.x):
A WordPress application container inside Container Station
Container Station Version Commands 3.x
Replace {@container_name} with the WordPress container name.export CONTAINER_NAME={@container_name} cat <<EOF >> /proc/`docker inspect -f '{{.State.Pid}}' ${CONTAINER_NAME}-wordpress-1`/root/var/www/html/.htaccess php_value upload_max_filesize 1280M php_value post_max_size 1280M php_value memory_limit 2560M php_value max_execution_time 3000 php_value max_input_time 3000 EOF
2.x
Replace {@container_name} with the WordPress container name.export CONTAINER_NAME={@container_name} cat <<EOF >> /proc/`docker inspect -f '{{.State.Pid}}' ${CONTAINER_NAME}_wordpress_1`/root/var/www/html/.htaccess php_value upload_max_filesize 1280M php_value post_max_size 1280M php_value memory_limit 2560M php_value max_execution_time 3000 php_value max_input_time 3000 EOF
Your terminal will look like the following (Container Station v3.x):TipThe WordPress container name can be found in Container Station > Overview > All > Name:
The file upload size limit of the WordPress application is increased.
Creating a Restore Job
- Go to Restore.
- Click Create Restore Job.
The Create Restore Job window appears.
- Under Job information, specify the job information.
Field
Action
Service type
Select WordPress.
Job name
Specify the job name.
The job name must be between 1 and 32 characters.
Description (optional)
Specify a description.
The description can contain up to 100 characters.
- Under Source and Destination, specify the source application.
- Under Source, click Browse.
- Select the source type:
Source Type
Action
Backup Job
- Click Backup Job.
- Select a service.
Folder
- Click Folder.
- Select the folder that contains the source application file.
This can be the destination folder of a backup job. For details, see Creating a Backup Job.
- Click Select.
- Under Source and Destination, specify the destination application.
- Under Destination, click Browse.
- Select a service.
- Click Select.
- Optional: Under Source and Destination > Source version, select the source version to be restored.
Multiple source versions are available only if the corresponding backup job has version management enabled. For details on enabling version management, see Creating a Backup Job.
- Under Restore Schedule, specify a restore schedule:
Schedule Type
Description
Manual
Runs only when a user starts the job.
Run once after
Runs the job after a linked job finishes running.
TipIf the linked job fails, the job will not run.- Click Select a linked job.
- Choose a linked job.
Run by schedule
Runs the job on a repeating schedule.
- Choose one of the following and specify the relevant information:
- One-time: Specify the date and time.
- Daily: Specify the time.
- Weekly: Specify the time and days of the week.
- Monthly: Specify the time and the days of the month.
- Periodic: Specify the date, time, and wait interval. A job with a periodic schedule runs on the date and time specified, then runs recurrently every wait interval. For example, if the wait interval is 2 hours then the job runs every two hours after its initial run.
- Optional: Select Set end time and specify a date and time for terminating the job schedule.
- Click Apply.
A schedule is created and appears in the schedule list.
- Click Apply or Restore Now.
The restore job is created.
If you clicked Restore Now, the restore job runs immediately.