Home Blog WordPress Management WordPress backups: Everything you need to know

Complete guide on WordPress backups

WordPress backups: Everything you need to know

Backups often do not get the attention they deserve. Whether it’s our personal data or that of our website, many of us tend to discount the risks associated with data loss. However, losing data without a way to restore it can lead to severe setbacks, more so in a WordPress environment.

In this article, we will cover everything you need to know about WordPress backups. We’ll cover how to backup your entire site, the best WordPress backup plugins, and how to backup wordpress databases. We’ll also cover best practices that will have you taking backups of your WordPress site like a pro.

Why WordPress backups are a must

WordPress backups are like an insurance policy that can save you from data loss in the event of a catastrophic event. Taking regular backups ensures that you can get your website up and running without any loss of data or functionality.

WordPress has built-in mechanisms, such as post revisions, to ensure no data is lost. While this feature is very good and works as intended, it does not protect you from unexpected crashes, security breaches, and hardware failures.

Content is at the heart of every WordPress website; after all, WordPress is a Content Management System. Without its content, a WordPress site would not be able to accomplish much. As such, protecting content from disasters is an important step in ensuring our website remains online.

This is where WordPress backups come in. Regardless of how you choose to carry out your WordPress backup, having a plan and a strategy in place will save you a lot of heartache and, possibly, your WordPress site.

With backups, you can easily:

  • Recover your website in the case of a catastrophic event
  • Restore files infected by malware
  • Rollback breaking changes

What should WordPress backups include?

You need to back up two main components: WordPress files and the database. Depending on the method you choose for your WordPress backup, you might need to back up each one separately or together. We will discuss the different backup methods in the next section.

WordPress files

WordPress files include the WordPress core files, plugins, themes, media, and any custom code. Backing up the core files, plugins, and themes is not necessary in most cases. The only exception here is if any of these include custom code, in which case it should definitely be backed up. Media should also be included in the WordPress backup, as this will make restoring the website easier and faster.

WordPress database

The WordPress database includes everything else that’s not found in files – and it’s a lot. All settings, posts, taxonomies, WordPress activity logs, and everything else will reside in the MySQL database. While files are the heart of your WordPress site, the database is its soul. Backing up the database, then, is critical.

WordPress backup methods

WordPress is very flexible, and this flexibility extends to backups. As the saying (even if a bit grim) goes, there’s more than one way to skin a cat, and the same applies to WordPress backups. Here are some of the most popular options:

  • Backup plugins
  • Online WordPress backup services
  • Backup through your hosting provider
  • Manual backups

Whether you prefer the convenience of backup plugins, the control of manual backups, or the laissez-faire of automatic backups, you’re sure to find a method that fits your requirements and technical abilities.

Easiest method: Backup Plugins

  • Pros: Easy to set up and manage
  • Cons: Some features require payment, limited control over the backup process

WordPress plugins offer an easy way to add extra functionality to your WordPress site. This is also true of backup plugins. A WordPress backup plugin can make taking a WordPress backup as easy as clicking a few buttons.

There is a broad selection of free and premium backup plugins available. Which one you choose will largely depend on your requirements. 

For this tutorial, we will be using a well-known WordPress backup plugin called UpdraftPlus.

To back up your WordPress site using a plugin:

Step 1: First, navigate to Plugins > Add New Plugin and look for UpdraftPlus. Install and activate the WordPress backup plugin.

Step 2: If you have installed UpdraftPlus, look for the option in the right-hand menu and click on it.

Step 3: Next, click on the Backup Now button and make sure both files and database options are checked.

Step 4: Lastly, click on Backup Now to start the backup.

Once the backup has been completed, you can download the files to your machine by clicking on the component you want to download. This is very important as it ensures you have a copy of the backup should a catastrophic event take place and you lose access to your WordPress site.

While UpdraftPlus is a well-reviewed option, it is certainly not the only one. Other options you might want to consider include:

  • Jetpack
  • Duplicator
  • BackWPup

Flexible method: Online service

  • Pros: Easy to use, minimal intervention required 
  • Cons: Limited options available

Online backup services tend to offer a more hands-off approach than any of the other methods. While service specifications will vary from one provider to the next, they typically include automatic backups, off-site storage, and backup history.

WPBuffs is one such option. The basic plan comes with one daily backup but also includes uptime monitoring, a premium WP Activity Log license, and a few other features. Backups are stored on Amazon S3, and you can choose between US and EU storage to meet GDPR compliance requirements.

BlogVault is another example of an online backup service. You’ll need to install their WordPress backup plugin, which takes care of everything for you. The number of backups the plugin takes will depend on your plan. The most basic plan, called Plus, offers a daily automatic backup, while the Max plan takes a backup every hour.

We will be using BlogVault to see how online services work.

To install the BlogVault plugin, you will first need to set up an account on their website. The process is easy and straightforward, and you can get started for free.

Enter your email address and a new password for the account. When prompted, enter the URL of the website. By providing the login credentials, you can allow BlogVault to install the plugin on your website. Otherwise, you can simply download the plugin and install it yourself, which is the safer option.

Once you’ve installed the plugin, click on BlogVault from the left-hand menu, and you will be taken to the BlogVault dashboard.

The plugin will automatically sync with your BlogVault account and take the first backup. Once the backup is completed, it will show on your dashboard as follows:

Convenient method: Hosting provider

  • Pros: Easy to use, typically cost-effective
  • Cons: Depending on the hosting provider

Many WordPress web hosts offer backups with their WordPress plans. Since these services differ from one hosting provider to the next, you’ll need to investigate what your provider offers. This is especially true for those offering managed WordPress hosting services. There are two important things that you need to be on the lookout for:

  1. Can backups be restored anywhere? – Make sure backups are not in a proprietary format that makes them incompatible with a WordPress site hosted elsewhere
  2. Can backups be downloaded to a local machine? – It is equally important to make sure that you can download the backups so that if something happens to the hosting provider, you can still get your WordPress website up and running elsewhere

Making sure the above two conditions are true is important as, push comes to shove, it allows you to move to another service provider.

You’re often able to back up your databases from the control panel provided by your hosting provider. Many hosts use cPanel, but custom dashboards are also available.

You’ll have to check with your particular host whether you’re able to back up databases. Many offer a clear set of instructions for downloading your database. In contrast, others don’t let you manually download databases unless it’s part of a site-wide manual backup.

In any case, there will be an option to back up your WordPress site, clearly marked on your host’s back end. If you’re using cPanel, it’s often the cPanel Backup Wizard within the Files section:

This will open the Backup Wizard. In the first step of the wizard, click the Back Up button.

In Step 2, we’ll need to take two partial backups – one for the Home Directory and one for Databases. We need to do this as Full Backups cannot be used to restore our website.

Complete control method: Manual backups

  • Pros: Offers a greater degree of control, no fees involved
  • Cons: Can be time-consuming, some technical expertise required

The manual backup method might sound intimidating, but it is actually easier than you might think. While it might not offer the convenience of other methods, such as WordPress backup plugins, it offers a greater degree of control.

A manual backup of the WordPress directory and its sub-folders can be carried out using cPanel, FTP, or SSH. If you select this option, it is important that you understand the basics of WordPress installation structure. This will help you complete a manual backup successfully. On the other hand, you can use the MySQL command line or phpMyAdmin to backup the database.

Note: Beginners typically find other methods, such as plugins and online backup services, easier. If this is your first time backing up a WordPress website, you might want to choose one of these methods instead. If you would still like to give manual backups a shot, we provide full instructions on how to do so. However, it is highly recommended that you try on a staging website first.

We’ll split the manual backup into two parts: files and the database.

Step 1: Backing up your WordPress files, themes, plugins, and media

As mentioned earlier, there are a number of files you’ll need to back up. Fortunately, you don’t need to save all of them, as the WordPress core files can be re-downloaded at any time.

Using SFTP

In this section, we’ll be backing up the files using Secure File Transfer Protocol (SFTP), so make sure you have a client such as FileZilla installed and your FTP credentials.

Download FileZilla

If you do not know your FTP credentials, your hosting provider should be able to provide these to you. Make sure you have:

  • The IP address of your WordPress file server
  • The username and password
  • The port to connect to

Once you have these, log into your site through your SFTP client. Next, look out for the www or public_html folders, in which you will find your WordPress directory.

If you have more than one site, you’ll find some of your other sites in dedicated folders, although the file structure is the same. Your main focus should be on the following:

  • The wp-config.php file from the website’s root directory
  • The wp-content directory

In a nutshell, the first file contains your site’s specific configuration settings, including the connection string WordPress uses to connect to the database. The wp-content folder is where your themes, plugins, and media files live.

The job here is simple: Click and drag the file and folder to your local machine, and the FTP client will copy everything locally. Once you’ve done this, pat yourself on the back as the first part is over.

Using SSH

SSH, or Secure Shell Access, allows you to access your website and database remotely using the command line. Unlike other programs, this doesn’t involve a visible interface. You just type commands in and execute them.

Log in to your website host’s dashboard and look for an SSH option. You may need to manually create your SSH credentials, and some hosts provide a dashboard to input commands. Can’t figure out what your SSH credentials are? Contact your host for help.

If your host does not provide an SSH interface, you can either open the Terminal (Mac and Linux) or install an SSH client like PuTTY (Windows).

When using the Terminal, paste in the ssh command provided by your web host. If you’re using PuTTY, fill out Host Name and Port and make sure SSH is selected. Then click Open. A terminal window will launch.

Enter your SSH username and password when prompted.

To avoid having to enter the command every time, we will create a shell script that we can run whenever we want to take a backup. Alternatively, we can schedule the script to run at predetermined intervals using cron.

Let’s start with the script.

From your site’s root directory, navigate to:

/home/yourusername/scripts

Replace yourusername with your SSH username. Open an editor such as vim using the command:

sudo vim wordpress_backup_script.sh

And then type the following:

#!/bin/bash
####################################
# WordPress files backup script.
####################################
# What we're backing up. 
backup_files="/srv/www/wordpress"
# Where we're backing up to.
dest="/home/backup/"
# Backup filename.
day=$(date +%A)
archive_file="WordPressBackup-$day.tgz"
# Status message.
echo "Backing up $backup_files to $dest/$archive_file"
date
echo
# Backup the files using tar.
tar czf $dest/$archive_file $backup_files
# End status message.
echo
echo "Backup finished"
date

Once ready, save the script. Next, we’ll schedule it to run every day at midnight using cron.

Open crontab using the following command:

crontab -e

Next, add the WordPress backup script using the following command:

0 0 * * * /home/yourusername/scripts/wordpress_backup_script.sh

Replacing yourusername with your SSH username.

To verify that our WordPress backup script has been successfully added to cron, run the following command:

crontab -l

You should see the WordPress backup script listed in the list of scheduled jobs.

Now, before we get to the next section, it’s important to discuss where backups should be saved.

Backups should not be left on the webserver. If something where to happen to the server, you’ll lose both the website and it’s backups. While it is generally fine to leave them on your local machine, this is not considered good practice. Each backup should be saved in its own folder, ideally named after the date the backup was taken. This will make it much easier to find a specific WordPress backup should you need it.

You should also make sure backups are stored in a safe location. If you have secure cloud storage service, consider leaving an additional backup there as a precaution. We will discuss this in more detail in a later chapter – so be on the lookout for it.

Step 2: Backing up your WordPress database

The next step to backing up your WordPress site is to back up the database. There are several ways to accomplish this – from using a GUI tool such as phpMyAdmin to SSH.

Unlike with folders, when taking a database site backup, we need to ensure everything is included. The number of database tables you’ll have in your database will depend on your setup.

Before we get started, we need to make sure we back up the actual WordPress database. While this will generally be called WordPress, the name varies. To confirm your WordPress database name, refer to the wp-config.php file we backed up earlier. Specifically, we are looking for the DB_NAME variable under the Database settings section. In our case, we can see that it is called mywordpressdatabase.

Take note of this name, as we will need it in just a bit.

Using a graphical tool (such as Adminer)

Using a GUI to access your database makes the process straightforward. Your host will often provide either phpMyAdmin or Adminer.

The tool’s location will vary depending on your host, but will usually be clearly labeled as such:

Once you’re in, you’ll find a list or drop-down showing your site’s database on the left-hand side:

Here, choose the database that corresponds to the database name we found in the wp-config file:

Next, click the Export link for the database, and if prompted, go with a custom export. On the Export screen, choose UTF-8 encoding if given the option, and choose a GZIP output option (again, if you can).

Finally, click Export and save the file to your computer.

Using SSH

Next, we’ll look at how to back up your database from the command line.

Staying in the SSH command line, enter this command, replacing dbuser and dbname with the proper credentials:

mysqldump -u dbuser -p dbname > example.sql

You can also schedule the database backup to run at pre-determined intervals using the same procedure we did for the WordPress files above.

With that, you should be done.

How to restore a WordPress backup

Whichever method of WordPress backup you select, be it backup plugins, manual, or any of the other methods, you need to be able to restore it successfully. In this section, we’ll be covering different ways to restore a backup. However, keep in mind that your restore process options will be limited by the option you used to take the backup.

Plugin restore method

Restoring a WordPress site backup using backup plugins is a more straightforward affair. Of course, this assumes that the database is already in place, which is invariably the case with a WordPress hosting account.

No database in place yet? Follow the instructions under Step 1: Create a MySQL Database & User for Your WordPress Restore in the Manual backup restore section below.

To restore backups using backup plugins, you first need to install the plugin on the site you want to restore. Not all plugins are compatible, so, for example, a backup taken with plugin A cannot always be restored with plugin B.

Since we used the UpdraftPlus WordPress backup plugin to take the backup, we will be using the same plugin to restore our backup.

1. Install the backup plugin and activate it, then head to the plugin’s page. In our case, we are using UpdraftPlus, so we’ll just go ahead and click on the plugin name from the left-hand menu

2. Next, scroll down to the Existing backups section and click on Upload backup files

3. Click on Select Files, choose the backups you want to restore, and then click on Open

4. The backup files will be added to the list of backups, at which point, you can click on the blue Restore button to restore the backup

Online service

The procedure for restoring a backup using an online service will depend on the service you choose to take the backup. Since we used BlogVault in the previous section, we will be using this online service to showcase how a backup is restored.

To restore a backup using BlogVault:

  • Log in to your BlogVault account
  • Locate the BACKUP tile
  • Choose RESTORE to restore to the same site or MIGRATE to restore to a different site
  • Choose which backup version you want to restore and fill in any required information.

BlogVault also offers the facility to download the website backup. From the BACKUP tile, click on DETAILS and then choose the Download Backup option:

This will download all backed-up WordPress files and a dump of the SQL database in a .ZIP file. You can then restore the files and database manually using the procedure covered in the Manual backup restore section.

Hosting provider

The procedure for restoring a WordPress backup through your hosting provider will depend on the provided backend. Since cPanel is a common option (and the one we used for taking backups), we’ll cover this in this section of the tutorial.

Step 1: Log in to your hosting provider’s backend and access cPanel. Head to the Files section and click on Backup Wizard.

Step 2: From the Backup Wizard, click on Restore.

Step 3: If you followed the backup procedure outlined in this article, you’ll remember we took two separate backups – one for files and one for the database. Now, we’ll need to restore each backup separately.  Click on Home Directory to restore the files.

Step 4: Click on the Choose file button and select the WordPress files backup files you want to restore. Once done, click on Upload to restore the files.

Step 5: All that’s left to do now is restore the database. The procedure for doing so is similar to that for restoring files. From Backup Wizard > Restore, choose Databases and then select the SQL dump file in the same fashion as we did with the directory backup.

Manual backup restore

Step 1: Create a MySQL Database & User for Your WordPress Restore

First, you need to create a new MySQL database for WordPress. This can be done in several different ways. However, for the purposes of this tutorial, we will be using phpMyAdmin.

You also need to create a MySQL user, which will be used to restore the data and connect to the new database.

Option 1: Creating a MySQL Database and User with phpMyAdmin

Follow the procedure below to connect to the MySQL server. We will be using a MySQL account with sufficient privileges to create a new database called wpdb and a new user called wpuser. The user we create will be used to both restore and access the database.

Note: The database name, username, and password in this procedure are just examples; you should use your own.

1. Login to phpMyAdmin. If you know the URL, you can connect to it directly, otherwise, speak to your hosting provider or WordPress administrator. To log in to phpMyAdmin, use a MySQL account with sufficient privileges.

2. Click on the Databases tab and create a new database called wpdb.

3. Once the database is created, click on the Privileges tab and click Add user account.

4. Enter wpuser as username, localhost as Hostname, and a secure password in Password.

Note: The Host name is used to specify from where the MySQL user can connect to the server. When using localhost, it means that the user will be used to connect from the same server, i.e. the WordPress PHP files and the database are hosted on the same server.

5. Scroll down and check the option Grant all privileges on database “wpdb”

7. Log out from phpMyAdmin.

We have now successfully created a new database for WordPress. We will be using this database to restore our backup file. If your MySQL backup file is 2MB or less, follow the steps outlined below. If it is larger than 2MB, follow the procedure outlined in Restoring a WordPress Database Larger Than 2 MB.

Option 2: Creating a MySQL Database and User Using MySQL Commands

Follow the procedure below to connect to the MySQL server using an account with sufficient privileges to create a new database, wpdb, and a new user, wpuser, that will be used to both restore and access the database.

Note: the database name, username, and password in this procedure are just an example and you should use your own.

1. First, connect to the SSH terminal using a client such as PuTTY. You’ll need the IP address of the server as well as the username and password for the webserver. Speak to your hosting provider or administrator if you do not have the required information.

2. Log in to my SQL by using the following command and enter the password once asked for it

sudo mysql

3. Create the database with the name wpdb by issuing the command

CREATE DATABASE wpdb;

4. Create the new MySQL user wpuser and assign a password (replace enteryourpasswordhere with a secure password) by issuing the command

CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'enteryourpasswordhere';

5. Grant the wpuser user full privileges to the database by issuing the command

GRANT ALL PRIVILEGES ON wptest.* TO 'wpuser'@'localhost';

Note: The localhost in the command above is used to specify from where the MySQL user can connect to the server. When using localhost, it means that the user will connect from the same server, i.e. the WordPress PHP files and the database are hosted on the same server.

6. Reload all privileges to make sure the newly created ones come into effect by issuing the command:

FLUSH PRIVILEGES;

7. Terminate the connection to the MySQL server with:

QUIT;

Step 2: Restore the WordPress Database

Now that you have created the WordPress database and MySQL user, it is time to connect to MySQL with the new username and restore the data.

A gentle reminder: This procedure only applies for backups up to 2MB. If your backup is larger, skip this section and head to Restoring a WordPress Database Larger Than 2 MB.

Restoring the WordPress Database with phpMyAdmin

To restore the backed-up WordPress database to the newly created database, follow the below procedure:

1. Log in to phpMyAdmin using the newly created user. Click on the database name in the left-hand side tree, and click on Import

2. Click on the database name in the left-hand side tree and click on Import

3. Click the Choose File and browse to the WordPress database backup file, which typically has a *.sql extension.

4. Click Go to start importing data to the new database. When the import is complete, you will be alerted that it was successful, as seen in the screenshot below.

Restoring the WordPress Database Using MySQL Commands

To restore the backed-up WordPress database to the newly created database, you only need to issue one command, which is below:

mysql –u wpuser –p wpdb < backupfile.sql

Once you issue the command, you will be prompted for the password, and once the password is entered, the restore will take place. Here is an explanation of all the switches in the command:

  • -u is used to specify the user
  • -p is used to prompt for the password
  • wpdb is the name of the database to which you will be restoring the backup
  • sql is the name of the WordPress database backup file

When the import is completed successfully, the normal prompt is returned, as shown in the screenshot below. If there are any errors, they will be reported here.

Restoring a WordPress Database Larger Than 2 MB

Restoring a large WordPress database backup can be tricky because when using phpMyAdmin, you cannot upload files larger than 2 MB. Also, if you are using the command line, the MySQL server will stop the process after a certain time as a precautionary measure. To circumvent this, you have to manually configure the server and increase its timeout values, etc.

However, you can avoid doing all the manual work and use a tool called BigDump instead. It is basically a tool that staggers the SQL queries and therefore allows you to restore big MySQL database backups without requiring you to change the MySQL server’s configuration. To restore a WordPress database backup using BigDump, simply follow the procedure below:

1. Download BigDump.

2. Extract the file php from the zip file and open it with a text editor.

3. Configure the database connection details. In this case, we are using the same database details used in the above examples:

  • $db_server = ‘localhost’;
  • $db_name = ‘wpdb’;
  • $db_username = ‘wpuser’;
  • $db_password = ‘enteryourpasswordhere’;

4. Save the file and rename it to something random, such as myrestore5544.php.

5. Use FTP to upload the big dump file and the database backup file (*.sql) to the root folder of your website.

6. Using a web browser, access the file on your website, for example, https://www.example.com/myrestore5544.php. Since I uploaded the backup file SQL in the same directory as the big dump tool, it automatically recognizes the file and gives me the option to restore the database, as highlighted in the screenshot below.

7. Click Start Import to import the database. Note that the duration of the process depends on the server’s response time and the size of the WordPress database backup. Therefore the larger the backup, the longer it will take to complete.

8. Once the database is restored, the tool will prompt you, as shown in the screenshot below. If there are any errors, you will also be alerted about them.

Step 3: Copy the WordPress PHP Files

Once you have restored the WordPress site database and configured the right privileges, it is time to restore the WordPress files. The process is simple; upload all the files to the new server by using either FTP or SSH. Check the database connection details in the wp-config.php file to ensure that the new connection details are used to connect to the newly restored WordPress backup.

You do not need to copy logs, backups, and temporary files since they are not needed by WordPress. Typically, such files have .log, .tmp, and .bak extensions. They are created by plugins and themes for logging and other operational purposes.

STEP 4: IMPORTANT – WordPress Security

Before considering your WordPress site fully restored and calling it a day, do:

  1. Delete the big dump tool from your website’s root directory.
  2. Delete the WordPress database backup file (*.sql) from your website root directory.
  3. Restrict the privileges of the MySQL user on the WordPress database.
  4. Apply the correct file permissions on all the WordPress PHP files and directories.

Common issues and how to solve them

As simple as these methods are, backing up a website can be quite complicated in the back end, and things may not always go smoothly.

If you encounter issues or errors, check here for the solution and to learn about some common mishaps before they occur.

Incomplete backup or missing files

To completely back up your website, it’s important to back up not just the database but also the website files.

Your website files (accessed through FTP) store the design and functions of your website. The database stores written content like posts and comments.

One common mistake is copying your website’s files through FTP, expecting it to save your posts, and only realizing once it’s too late that those are stored in the database. Back up both to avoid this mishap.

Lost, damaged, or corrupted backups

Sometimes backups can be corrupted as they’re being compiled, or not all of the data gets transferred over. Or maybe you lost your backup and can’t find it at all!

This may be due to the particular backup plugin you’re using, so if you’re having this issue crop up frequently, you may wish to try out a different plugin instead.

If all your backup plugins seem to result in corrupted data, there might be a problem with your site itself, and it’s best to get a developer to check that out.

Otherwise, the solution here is simple: store multiple backups in multiple different places. If you ever lose track of a backup or end up with a corrupted one, all isn’t lost.

Slow backup

If you try to back up your database and it takes forever, there are several potential problems.

Look out for these potential issues:

  • Slow Disk I/O and CPU: If your website’s server itself is very slow, then uploading all your website and database files will simply take a while. The only thing to do is contact your host or upgrade your plan.
  • Large files: If you have very large files or massive databases included in the backup, they may be seriously slowing down backups. You may wish to exclude these files from automatic backups and make sure you don’t have a plugin creating huge databases.
  • Cron job issues: If your automated backups seem slow or broken, the issue could be with WordPress’ cron jobs. Check your logs and make sure cron jobs are working properly, and large files aren’t clogging it up.
  • Old zip module: UpdraftPlus falls back to PclZip, which is very slow if PHPZip or Binary Zip are not available. You can check cPanel or contact your web host to make sure PHPZip is working.
  • Outdated PHP version: If you’re not using PHP 8 or above, it’s a good idea to upgrade. Besides being a security concern, PHP 5 is much slower.
  • Slow data transfer: Once your backup files are compiled by a plugin like UpdraftPlus, they’ll need to be sent somewhere else, either to your computer’s hard drive or a destination server. If there’s a data transfer cap on the server or your PC is slow, transferring the files could take longer than normal. Try sending the backup to a different server.

Low PHP Memory Limit

Performing a WordPress database backup can take a lot of memory, but some web hosts set the limit very low. If your backup plugin runs out of memory, you’ll need to increase the PHP memory limit.

It’s best to contact your web host to do this for you if you don’t know what you’re doing, but you can also do it manually.

Access your website files via an FTP client like FileZilla.

Find wp-config.php in the root folder of your website and open the file.
Search for WP_MEMORY_LIMIT. You should see a function like:

define('WP_MEMORY_LIMIT', '32M');

Change the number (32M in this example) to 32M, 64M, 128M, or 256M – you don’t usually need more than 32M or 64M.

define('WP_MEMORY_LIMIT', '64M');

Now, find and open php.ini in the root directory or the wp-admin directory. (If you’re on shared hosting, you won’t be able to edit this file.)

Search for memory_limit and change this value to the one you set above.

Now, find and open .htaccess in the root directory. You may need to enable hidden files and directories in your FTP program.

Search for php_value memory_limit. Change the value to the one you set above.

If this doesn’t clear up the memory issue, your web host likely has locked the memory limit too low. You’ll need to contact them if this is the case.

Insufficient Server Resources

Backing up a website can be a server-intensive task, and shared hosting isn’t always up to the task. This can occur especially often if you have a very large website and a server that can’t quite keep up.

Many backup errors you’ll see are caused by your server not having enough resources to handle them. You’ll need to upgrade your web host, or perform a manual WordPress database backup if you just can’t seem to get any plugin to perform a WordPress database backup.

What to consider when planning backups

If you fail to plan, you plan to fail and the same is true for backups. Having a thought-out process will ensure backups remain a breeze and consistent, ready to get you out of a pickle should push ever come to shove.

Here’s what you need to keep in mind when thinking about your backup strategy:

Full vs incremental backups

A full, complete backup includes your entire WordPress site, while incremental backups only include what’s new from the last backup. Full backups take longer to back up and are faster to restore. The opposite is true of incremental backups – they are fast to back up (since we are only backing up the changes) but slower to restore (since we have to restore multiple files).

If you opt to manually backup your WordPress site, full backups are your only option. However, if you choose a WordPress backup plugin, you might have more options – including incremental backups.

Which option you choose will largely depend on the size of your WordPress site. Larger sites might benefit more from incremental backups, while smaller sites might find full backups more efficient.

You’ll also find hybrid solutions. For example, UpdeaftPlus Premium, a popular WordPress backup plugin, takes incremental backups and automatically adds them to the master. This is one advantage of using a premium WordPress backup plugin vs. free options, which tend to be more limited.

Backup files storage

Whether you take automatic backups or manual backups, where you store your WordPress site backups is very important. The main idea here is redundancy. Avoid having just one copy of your database and site files backups at any given time.

Offsite backup storage – that is to say, storage that is not on your WordPress site server is an absolute must.

If you have a larger site, an unlimited backup storage solution might make more sense to you. Cloud storage integration is an option worth considering since this provides you with access to your backups wherever you are. Several WordPress backup plugins also provide you with storage – however, it is still wise to keep a copy elsewhere.

File integrity

It is equally important to ensure files have not been tampered with before backing up your WordPress site. Tampered files, that is to say, files that have been altered, may indicate malware or potentially a hack. Backing up infected files means you’ll be restoring an infected site should you ever need to restore your website from a backup.

Our Melapress File Monitor plugin scans your WordPress site directories and files and alerts you of any changes. You can then investigate what prompted the file change and take the appropriate measures to avoid infecting backups with malware.

The plugin is completely free, is multisite network ready, and integrates with WP Activity Log for an even more comprehensive monitoring solution.

Backup testing

Testing backups is just as important as taking them. You need to be as sure as you can be that your WordPress website can be restored to a functional state. We covered how to restore a site backup using both backup plugins and manual methods earlier in this article. Undertaking test restores not only helps you ensure database and site files backups work, but also helps you familiarize yourself with the process should you ever need to restore your WordPress website.

Frequently Asked Questions

Does WordPress have built in backup?

WordPress comes with an export feature that allows you to export posts, pages, comments, menus, and a few other things. However, this does not include the database, plugins, custom code, and other important things that should be included in a backup.

How do I backup my entire WordPress?

There are a few options available to back up your WordPress website. WordPress backup plugins are a popular choice, as are backup services such as those offered by hosting providers and 3rd party services. Which option you choose will largely depend on individual factors such as budget, website sixe, and how much time you want to dedicate to the task.

What is the easiest backup for WordPress?

The easiest way to backup WordPress is by using a backup plugin. Depending on the plugin, available features typically include automatic scheduled backups, offline storage, and easy restore. Manual backups, on the other hand, provide a greater degree of control but require a more hands-on approach.

Does WordPress backup automatically?

WordPress does not have automatic backups. However, some WordPress backup plugins and services do include automatic backups.

Posted inWordPress Management
Joel Farrugia
Joel Barbara

Joel was our technical writer who wrote a number of articles on our blog. With a background in tech and content, he has a passion for making technology accessible and understandable for everyone.


Stay in the loop

Subscribe to the Melapress newsletter and receive curated WordPress management and security tips and content.

Newsletter icon

It’s free and you can unsubscribe whenever you want. Check our blog for a taste.

Envelope icon