How To Perform Regular WordPress Backup
Setting up your site to run regular WordPress Backups will take you a few minutes of work, but it can save you a ton of trouble.
Sadly, many WordPress users learned this the hard way. As a result, when their site goes down, what seemed like a temporary glitch, turns out to be an all-out data loss situation.
Since it is now so easy to backup WordPress website, there is no reason why you shouldn’t. But why is WordPress backup so important? Do not web hosting companies swear to take care of this?
Table of contents:
- Why Should You Run Regular WordPress Site Backup?
- Security Practices for Backups
- What Method Should You Use For WordPress Backup
- How to Backup your WordPress Website
- Cloud Storage Options for WordPress Backups
- How Can You Use This Information?
- FAQ
Why Should You Run Regular WordPress Site Backup?
There is a long list of things that could bring down your website. Data loss in your WordPress hosting, a malware infection, your files getting hacked, etc. Sometimes, you may even install a plugin or theme that takes down your site.
Many web hosts promise regular backups of your data. But we (and many others) have found you cannot fully rely on these. Even when they do a complete backup, it is jumbled up with the data of several other websites.
In many cases, when you do a restore from WordPress hosting backups, you still loose weeks or even months of work. And even then, you should be happy you were able to restore your site. There have been cases where a website gets lost and no one could do anything to get it back. Not the webhost, not the site owner.
Since it is now so easy to run regular WordPress site backups, it makes sense to secure all the effort you put into creating your website by running regular backups and storing them away from your server.
Security Practices for Backups
When it comes to WordPress backups, ensuring the safety of your backup files is just as crucial as creating the backups themselves. Secure backup practices protect your data from unauthorized access and potential cyber threats, safeguarding the integrity and confidentiality of your website’s information.
Here are some essential security practices to consider for your WordPress backups.
Use Encryption
Encrypt your backup files to add an extra layer of security. Encryption converts your data into a coded format, making it unreadable to anyone without the decryption key.
This step is vital, especially when storing backups on cloud services or external drives, as it protects your data in transit and at rest.
Secure Storage Locations
Choose secure storage locations for your backups. Whether you opt for cloud storage solutions like Google Drive, Dropbox, or Amazon S3, ensure that you understand their security features and use strong passwords and two-factor authentication (2FA) to protect your accounts.
For physical storage devices like external hard drives or USB sticks, keep them in a safe, controlled environment to prevent theft or damage.
Limit Access
Restrict access to your backup files. Only trusted individuals within your organization should have the ability to retrieve or restore from backups.
Implement role-based access controls (RBAC) and audit logs to monitor who accesses your backup files and when ensuring accountability and reducing the risk of internal threats.
Regularly Update Security Measures
Cyber threats are continually evolving, and so should your security measures. Regularly update your backup and security software to the latest versions to benefit from enhanced security features and vulnerability patches.
Stay informed about new security threats and best practices to ensure your backup strategy remains robust.
Verify Backup Integrity
Periodically verify the integrity of your backup files. Ensure that backups are complete, uncorrupted, and free from malware.
Regular integrity checks confirm that your backups are reliable and usable when needed, providing peace of mind and swift recovery in the event of data loss.
What Method Should You Use For WordPress Backup
There are many who still prefer a manual backup process, where you download your site files and database to your computer from time to time.
At FixRunner, we prefer automated backups. This way, you can use WordPress backup plugins to backup your WordPress database and files according to a schedule you set.
In this guide, we will show you how to use the UpdraftPlus plugin (which we highly recommend) to run automated backups to a remote location.
We will also show how to backup WordPress manually to your computer, for those who prefer this option.
How to Backup your WordPress Website
Your files, which include your themes, plugins, uploads, etc; and your database, which is used to store posts, pages, comments, users, etc are what make up your WordPress website.
A full backup of your WordPress site involves keeping a copy of both your files and your database in a remote location. In this guide, we will show you how to do this using two methods:
- Using the UpdraftPlus backup plugin.
- Manually backing up files and databases to your computer.
Backing up your WordPress site with UpdraftPlus
Using UpdraftPlus, you can easily backup your WordPress site to remote locations such as Google Drive, Dropbox, Amazon S3, etc.
The free version comes with ample features to help you run WordPress backups. However, you would only need the paid version if you need special features like encryption.
UpdraftPlus creates backups of the files in your wp-content folder, which is the only folder you really need to backup. This folder contains your themes, plugins, uploads, and other files unique to your website. The other folders contain WordPress core files which you can always download from WordPress.org.
UpdraftPlus can be set to automatically backup your site according to a schedule, or you can directly run a backup using the interface.
Automatic Backups With UpdraftPlus
In this section, we will show you how to set UpdraftPlus to backup your Website to Google Drive once every week. Depending on how busy your site is, you may decide that backups should run more often. For example, if your site gets 20 new posts daily, you may choose to set the daily backups.
For someone who adds two posts per month, setting the schedule to monthly might just be good enough.
Here’s how to set up scheduled WordPress backups:
Firstly, you need to install the UpdraftPlus plugin.
To do this, login to your WordPress dashboard and go to Plugins > Add New.
Secondly, search for “UpdraftPlus” and click Install Now.
When the installation completes, click Activate.
Next, go to Settings > UpdraftPlus Backups.
Switch to the “Settings” tab.
Set the “Files” and “Database” backup schedule to weekly, and leave the number of backups retained set to 2.
Scroll down to the “Choose your remote storage” section and click on Google Drive. When it expands the Google Drive options, right-click on “Follow this link to your Google API console…” and select “Open in new tab”.
Next, click on the My Project dropdown and click the plus button to create a new project.
Name your project and click Create.
Click on the My Project dropdown and click the project you just created.
Click Enable API at the top of the screen. When the API library opens, click Drive API.
Next, click Enable.
WordPress Backup – Creating Credentials
To use the API you just enabled, you have to create credentials for it. These credentials are the actual information used to connect UpdraftPlus to Google drive.
To start this step, click on the Credentials tab on the left, click the Create Credential dropdown, and select “Help me choose”.
Select “Google Drive API” as the API you are using, select “Web browser (JavaScript)” as the place you would be calling the API from, select “User data” as the kind of data you would be accessing, and click What credentials do I need?
Next, enter a name you choose for your OAuth client. Under “Authorized Javascript origins”, enter the URL of the site you want to backup with the updraft.
To get your authorized redirect URI, switch to the tab where UpdraftPlus is open. You will find this in the Google Drive section. Copy this URI and paste it into your credential setup page.
After pasting the redirect URI, click Create client ID.
In the next step, enter a product name and click Continue.
Click Done to complete the creation of your credential. You will be taken to a page listing your credentials.
Click on the credential you just created to reveal your “Client ID” and “Client Secret”.
Copy the Client ID into the “Google Drive Client ID” input box in your Updraft Settings, and copy the Client secret into the “Google Drive Client Secret” input box.
Scroll to the bottom of the page, check the box to enable email notifications and click Save Changes.
Authenticate Google Drive
You will be prompted to authenticate Google Drive. Click on the authentication link.
If you are taken to the Google login page, select the account you set up your credentials with. Next, click Allow to authenticate UpdraftPlus.
After authenticating, you will be taken back to the plugin page and an authentication success message will be seen at the top of the screen. Also, your first backup would begin automatically.
And that’s it. You’ve successfully set UpdraftPlus to backup your WordPress files and database once every week.
A note about authentication: In some cases, when you try to authenticate, you get an error message like the one below.
To resolve this, click the Learn More link. On the next page, scroll to the “Apps for testing or personal use only” section and click the “Risky Access Permission By Unreviewed Apps” link. Lastly, click Join Group.
You can now go on to authenticate UpdraftPlus to use Google Drive.
Running a One-Time Backup Using UpdraftPlus
Beyond setting up a backup schedule, you may sometimes need to run a one-time backup of your WordPress site. For example, this would be necessary if you are about to make changes to your site that can break it.
To run a one-time backup with UpdraftPlus, go to Settings > UpdraftPlus Backups
Click Backup Now.
Leave all items selected to backup everything in your “wp-content folder” and your database, and click Backup Now.
If you however decide to make changes to what is backed up, note that you can expand each section by clicking the dotted lines.
After, clicking Backup Now, you will see a backup progress report indicating the backup has started. Depending on the size of your website, this might take a while.
When the backup completes, you will see a message in the “Last log report” like the one below.
That’s it. Your backup is complete!
Manually Backing Up Your Files And Database To Your Computer
Another way to backup your WordPress files and database is by storing them locally either in your computer, or in other physical media like an external hard disk, or a DVD.
To use this method, you would need to download your WordPress files and export your MySQL database.
As we already mentioned above, the main folder you would need to download is your “wp-content” folder. All other folders can simply be re-downloaded from WordPress.org.
However, you may also choose to download your “wp-config” file, especially if you have made many custom changes to this file.
Downloading WordPress Files using FTP
To download and backup your files using this method, you would need to connect to your web server using FTP. Read this guide to learn how.
After connecting to your server using FileZilla as explained in the guide, your website files will be displayed on the bottom right, while your computer files will be displayed on the bottom left.
In the computer files area, double-click Desktop to open the desktop folder. This is so you can easily find the folder we are going to download to your desktop.
In the website files area, search for the folder that contains your WordPress files (usually the “public_html” folder) and double-click to open it.
Next, search for the “wp-content” folder, right-click on it, and click download.
Depending on the size of your website, the download may take a while. Wait for it to complete.
When the download completes, look at the transfer count section in the bottom left.
If the download was successful, “Queued files” should be empty, “Failed transfers” should be empty, and “Successful transfers” should show a high number.
Also, on your desktop, you will see a “wp-content” folder.
Next, you may decide to also backup your wp-config file. To do this, scroll down to find this file, right-click on it, and click Download.
This download should only take a moment. When it completes, the wp-config file will also be seen in your Desktop.
Now, create a folder named WordPress Backup and move both the “wp-content” folder and the “wp-config” file into this folder.
Manually Backing Up Your Database
You can easily backup your database with PhpMyAdmin.
This guide will show you how to do this using cPanel as your web admin panel, but the process should be very similar in other admin panels.
Firstly, login to your cPanel account. The login details are usually the same as you used in accessing your server through Filezilla, but you may ask your hosting company for the login link if you do not have that.
In cPanel, scroll to the “Databases” section and click on ‘phpMyAdmin‘.
In phpMyAdmin, click on Databases to view all databases in your account.
However, if you do not know which one is your WordPress database, you can find it in the wp-config file we downloaded in the previous section.
Open this file and search for the line that looks like this:
define(‘DB_NAME’, ‘Database_Name’);
The part “Database_Name” will contain the actual name of your database. Find this database in phpMyAdmin and click on it.
When this database opens, click Export.
Leave “Export Method” set to Quick, and “Format” set to SQL. Click Go to start the export.
Your database SQL file would begin to download shortly. When this download completes, you have backed up your database.
Move the downloaded SQL file to the WordPress Backup folder which already contains your WordPress files. You may now decide to burn this folder to a DVD or store it in an external storage device.
If you are using this backup option, you have to repeat this process often. Depending on how busy your site is, you could do it daily, weekly, or monthly.
Cloud Storage Options for WordPress Backups
In today’s digital age, cloud storage has become a cornerstone for securely managing and storing vast amounts of data, including WordPress site backups.
With several cloud storage services available, it’s crucial to understand the distinct features, benefits, and limitations of each to make an informed decision that best suits your backup needs.
Let’s explore some of the most popular cloud storage options: Google Drive, Dropbox, and Amazon S3.
Google Drive
Pros:
- Generous Storage: Google Drive offers 15 GB of free storage, which is ample space for small to medium-sized WordPress sites.
- Seamless Integration: For those already using Google Workspace services, integrating Google Drive for backups is straightforward and adds to the ecosystem’s convenience.
- User-Friendly Interface: Google Drive is known for its simple, intuitive interface, making it easy to manage and access backup files.
Cons:
- Privacy Concerns: Some users might have reservations about Google’s data privacy practices, given its extensive data collection across services.
- Limited Free Storage: For larger websites, the initial 15 GB might not suffice, necessitating a paid upgrade for more storage space.
Dropbox
Pros:
- Easy Sharing: Dropbox excels in file-sharing capabilities, allowing users to easily share backup files with team members or across devices.
- High Security: Dropbox offers robust security features, including file encryption and two-factor authentication, ensuring your backups are well-protected.
- Version History: It keeps versions of your files for up to 30 days, enabling you to revert to earlier versions of your backups if necessary.
Cons:
- Smaller Free Storage: Dropbox offers only 2 GB of free storage, which is on the lower side compared to its competitors.
- Bandwidth Limits: There are limitations on the bandwidth for file sharing, which might be a concern for those needing to access backups frequently or share them extensively.
Amazon S3
Pros:
- Scalability: Amazon S3 stands out for its scalability, making it an excellent choice for websites of all sizes, as you pay only for the storage you use.
- Reliability and Availability: Backed by Amazon’s massive infrastructure, S3 offers high durability and availability, ensuring your backups are safe and accessible.
- Advanced Features: S3 provides a range of advanced features, including detailed access controls and integration with other AWS services for more complex backup strategies.
Cons:
- Complexity: Amazon S3’s wide range of features and settings can be overwhelming for users unfamiliar with AWS, making it less user-friendly than some alternatives.
- Cost Predictability: While you pay for what you use, the pricing structure can be complex, and costs can escalate as your needs grow, making it challenging to predict expenses.
How Can You Use This Information?
We cannot stress enough how important it is to run regular WordPress sites backup. If this was not a practice for you, please use the steps covered in this guide to set up a reliable backup process.
Also, we would recommend that you utilize the scheduled backup option using UpdraftPlus. This method is simple, works well, and is being used in millions of WordPress sites.
You may also add an extra layer of safety by performing manual backups every once in a while in addition.
If, on the other hand, you prefer only manual backups, go ahead and use the steps covered, but remember to do it often.
As a reminder, do not store backups within your server. It should always be in a remote location, such as in cloud storage (Google Drive in our example), or in your local computer.
Also, another thing you need to address to improve your site safety is to secure it against hackers. Read this article to find out how best to do this.
FAQ Section for WordPress Backups
Why is it important to regularly back up my WordPress site?
Regular backups ensure that you have a recent snapshot of your site, which is crucial for restoring your website in case of data loss, hacking, server failures, or accidental deletions.
Backups act as a safety net, allowing you to recover your site quickly and minimize downtime.
How often should I back up my WordPress site?
The frequency of backups should align with how often your site’s content changes. For dynamic sites with daily updates, daily backups are recommended.
For less frequently updated sites, weekly backups may suffice. Consider real-time backups for e-commerce sites or sites with high transaction volumes.
What’s the difference between manual backups and using a plugin?
Manual backups involve manually exporting your site’s files and database, typically using FTP and a database management tool like phpMyAdmin.
Plugin-based backups automate this process, allowing you to schedule backups and store them on cloud services easily. Plugins offer convenience and consistency, while manual backups give you more control.
Are cloud storage services safe for storing WordPress backups?
Yes, reputable cloud storage services like Google Drive, Dropbox, and Amazon S3 offer robust security features, including encryption and access controls, making them safe options for storing backups.
Ensure you use strong passwords and enable two-factor authentication for added security.
Can I store my WordPress backups on my hosting server?
While you can store backups on your hosting server, it’s not recommended as your primary storage method due to the risk of server failures or hacking incidents affecting both your live site and backups.
Offsite storage, like cloud services, provides a safer alternative by keeping backups separate from your live environment.
How do I restore my WordPress site from a backup?
Restoring your site depends on how the backup was created. For plugin-based backups, most backup plugins offer a restoration feature within your WordPress dashboard.
For manual backups, you’ll need to upload your files via FTP and import your database using phpMyAdmin or a similar tool. Always test backups and restoration processes periodically to ensure they work as expected.
Do WordPress backups include my posts, images, and plugins?
Yes, a complete WordPress backup includes all your site’s components, such as posts, pages, images, plugins, themes, and the database, which contains your settings and content.
Ensure your backup method is configured to include all necessary files and directories.
What is the best WordPress backup plugin?
The “best” plugin varies based on individual needs and preferences. Popular options include UpdraftPlus, VaultPress (Jetpack Backup), and BackupBuddy.
Each offers a range of features from automated scheduling to cloud storage integration. Evaluate your site’s specific needs and choose a plugin that aligns with those requirements.