Which WordPress Files Should You Back Up? (And How to Do It Right)

Hey there, WordPress user! Let me guess – you know you should be backing up your website regularly, but you‘re not quite sure which files to include or how to go about it. Sound familiar?

Don‘t worry, you‘re not alone. In fact, a staggering 60% of WordPress sites don‘t have any backups at all! But considering that over 90,000 hacking attacks hit WordPress sites each minute, neglecting backups is like driving without insurance. It‘s only a matter of time before disaster strikes.

The good news is that once you understand which files are most critical to back up and automate the process with the right tools, you can rest easy knowing your site is fully protected. So let‘s dive into the details!

WordPress Files vs. Database: What‘s the Difference?

First off, it‘s important to understand that a complete WordPress backup includes two main components:

  1. The files that make up your WordPress site (Core, Themes, Plugins, Uploads, etc.)
  2. The MySQL database that stores your content and configuration settings

Think of your WordPress files as the "body" of your site (the styling, functionality, and media) and the database as the "brain" that tells WordPress what content to display and how everything fits together. Both need to be backed up, but not necessarily at the same frequency. More on that later!

The Most Critical WordPress Files to Back Up

So which specific WordPress files should you include in your regular backups? Let‘s break it down:

1. The wp-content directory

The /wp-content/ folder is the most important directory to back up because it contains all the files that make your site unique, including:

  • /wp-content/themes/ – your active theme and any custom theme files
  • /wp-content/plugins/ – all installed plugins
  • /wp-content/uploads/ – all media files you‘ve uploaded via the WordPress Media Library

Basically, if you‘ve uploaded it to your site or made customizations, it lives in /wp-content/ and needs to be backed up regularly.

One exception is the /wp-content/cache/ directory, which some caching plugins like WP Rocket or WP Fastest Cache use to store temporary files. It‘s safe to exclude this subfolder from backups since it will get regenerated automatically.

Expert Tip: Not sure which theme and plugin files you‘ve customized? Use a plugin like WP Hive or WP Pusher to track and version control your custom code changes outside the WordPress dashboard.

2. WordPress configuration files

In addition to /wp-content/, there are two critical files in the root directory of your WordPress site:

  • wp-config.php – contains your database connection details and other site-wide settings
  • .htaccess – handles WordPress permalinks and other server configuration rules

While it‘s technically possible to restore your site without these files, backing them up ensures you won‘t have to manually recreate them, which can be tricky and time-consuming.

3. Core WordPress files (optional)

The core WordPress files (like /wp-admin/ and /wp-includes/) don‘t typically need to be backed up since you can always download a fresh copy from WordPress.org. However, some backup plugins include them anyway as part of a complete snapshot of your site at a given point in time.

Including core files gives you an exact restore point, which can be useful for troubleshooting or if your server environment changes. But it‘s not strictly necessary for most backup scenarios. If storage space is a concern, you can safely skip these.

How Often Should You Back Up WordPress Files vs. Database?

Now that you know what to back up, let‘s talk about how often. A smart backup schedule balances protection and performance based on how frequently different components of your site change.

Here‘s a sample 3-2-1 backup strategy to follow:

  • 3 backup copies (primary data + 2 backups)
  • 2 different storage locations (e.g. web server + cloud storage)
  • 1 off-site backup (geographically separated from primary data)

And here‘s how that might look in terms of backup frequency:

Backup TypeFrequencyStorage Location
Complete site backup (files + database)MonthlyWeb server + Cloud storage
Database backupDailyWeb server + Cloud storage
Custom theme/plugin file backupWeeklyWeb server + Cloud storage
Local backupQuarterlyExternal hard drive

Of course, you can (and should!) adjust these intervals based on your specific site needs. For example, a high-traffic WooCommerce store may need daily file backups to capture new product images, while a mostly static brochure site might only need monthly database backups.

Storage space considerations: Keep in mind that backup frequency also impacts storage space requirements. A typical WordPress site database backup is around 500MB, while a full site backup with themes and uploads can easily reach 5-10GB+.

To avoid ballooning storage costs, I recommend keeping only a set number of backups at each interval before deleting the oldest ones to make room for new versions. Here‘s a sample retention schedule:

Backup TypeRetention Period# of Backups
Monthly site4 months4
Weekly files6 weeks6
Daily DB2 weeks14

How to Automate WordPress Backups with Duplicator Pro

Scheduling and managing backups on your own is a tedious process that‘s easy to forget or mess up. That‘s why I recommend using a WordPress backup plugin like Duplicator Pro to automate the process and store backups securely.

Here‘s how to create an automated backup schedule in Duplicator Pro:

  1. Go to Duplicator Pro > Schedules and click the "Add New" button
  2. Enter a name for your schedule and choose a storage location (e.g. Dropbox)
  3. Under "Runs and Frequency", choose a backup interval:
    • Daily/Weekly/Monthly for full site backups
    • "Custom" to set specific days/times for partial backups
  4. (Optional) Click "Add New" under "Filters" to include/exclude specific files/folders
  5. Save and repeat for additional backup schedules as needed

Duplicator will now run your backups automatically in the background according to the schedules you set. You can view all your stored backups under Duplicator Pro > Backups.

To restore a backup, simply download the backup ZIP file and installer.php script, upload them both to your server, and open the installer URL in your browser. Duplicator will walk you through a step-by-step process to restore your files and database.

Expert Tip: Don‘t wait for an emergency to test your backups! Periodically download a backup, unzip it locally, and do a trial run of the restore process in a staging environment to ensure the backup is valid and complete.

WordPress Backup Security Best Practices

One final note – backups are only as secure as the security measures you put around them. Here are a few best practices to keep in mind:

  • Encryption: Make sure your backup files are encrypted at rest and in transit using SSL/TLS. Most reputable cloud storage services will handle this for you.
  • Access Control: Limit access to your backup files with strong passwords and user permissions. Avoid storing backups in public web directories.
  • Monitoring: Enable notifications for backup failures or storage quota warnings so you can address issues proactively. Duplicator Pro can alert you via email or Slack if something goes wrong.
  • Redundancy: Remember the 3-2-1 backup rule – multiple copies in multiple locations to protect against hardware failure or disasters.

Following these best practices will ensure that your backups are not only complete, but fully secure and recoverable when you need them most.

Putting Your WordPress Backup Strategy Into Action

Whew, I know I just threw a lot of information at you! But the main takeaway is this:

Backing up your WordPress site doesn‘t have to be complicated or time-consuming. By understanding which files are most critical and using a plugin like Duplicator Pro to automate the process, you can ensure your data is fully protected with minimal effort on your part.

So what are you waiting for? Take some time today to audit your current backup process (or lack thereof) and put together an action plan based on the principles we‘ve covered. Your future self will thank you!

And if you have any other questions about WordPress backups or Duplicator Pro, don‘t hesitate to leave a comment below or reach out to our support team. We‘re always happy to help.

Happy backing up!

Did you like this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.