Which WordPress Files Should You Backup? (+ How to Do It)

Having an up-to-date WordPress backup protects you against unexpected server failures and hacks.

As your website grows and your backup file size increases, you may wonder which WordPress files you need to keep backed up. However, you don’t have to back up every file if you don’t want to.

We’ve been in the industry for over 15+ years, and our experience can help you optimize your backup files. We’ll teach you about different WordPress files, their importance, and whether it’s worth saving them or not.

In this article, we will show you which WordPress files you should back up and how to do it.

Which WordPress files should you backup and the right way to do it

Why Set Up WordPress Backups?

All websites are vulnerable to hacking attempts, DDoS attacks, data theft, and data loss. This could happen to even the most secure WordPress websites on the internet.

A WordPress backup solution for your website is your insurance against all those terrible things. It lets you keep your content safe and restore your website after an accident.

Many beginners believe that their sites probably don’t need a backup system. This is until they run into problems and realize how easy it would have been if they had a backup.

We will cover multiple topics in this article. You can click the links below to easily jump to any section:

  • What Is the Best Way to Create WordPress Backups?
  • Which WordPress Files Should You Back Up?
  • Backing Up Core WordPress Files
  • Backing Up the wp-content Folder
  • Backing Up WordPress Configuration Files
  • Backing Up WordPress Database
  • Why Not Just Back Up All WordPress Files and Database Every Time?
  • Create Multiple WordPress Backup Schedules

What Is the Best Way to Create WordPress Backups?

There are several ways to back up your WordPress site. However, the best way to set up a backup is by using a plugin. That’s because it’s easier to use, you don’t need any technical knowledge, and you get more control over which files and folders are saved.

There are many free and paid WordPress backup plugins available. You can take a look at our expert picks of the best WordPress backup plugins.

We recommend using Duplicator Pro because it is a beginner-friendly and powerful plugin. Over 1,500,000 professionals use it to create backups, clones, or migrate their websites. It offers a step-by-step wizard to create backups and easily restore them.

You can also integrate Duplicator Pro with cloud storage services like Google Drive and Dropbox, set up automatic backup schedules, create recovery points, and more.

Other than that, there are manual methods of backing up a WordPress site. For instance, you can use your hosting provider’s cPanel or an FTP client to access important files, folders, and databases. From here, simply download them onto your computer as backups.

The manual methods can be overwhelming for beginners. Plus, they can be time-consuming as you cannot schedule backups automatically.

For more details, please see our complete guide on how to back up your WordPress site.

That being said, let’s see which files you should back up in WordPress.

Which WordPress Files Should You Back Up?

Your WordPress site has three kinds of files and one database:

  • Core WordPress files
  • Files in the wp-content folder (your themes, plugins, and uploads)
  • WordPress configuration files
  • Your WordPress database

You will want to back up each of these files and databases. This way, you can easily restore your site to a previous state where it was functioning correctly.

Backing Up Core WordPress Files

Core WordPress files are the files that run your WordPress website. You typically never change these files, so they remain the same on all WordPress sites.

The core WordPress files include all files in the root folder, wp-includes, and the wp-admin folder.

You can always get fresh copies of these files from the WordPress.org website. This is why you don’t always need to back up these files.

WordPress files and folders

Backing Up the wp-content Folder

The wp-content folder is where WordPress stores all your images, media files, themes, and plugins. The contents of this folder are unique to your website.

If you know which WordPress plugins and themes are installed on your site, then you can always get fresh copies of them from their sources. In that case, you don’t need to back up the plugins and themes folders.

If you can’t remember all the plugins or the theme you have installed, then you should back up these folders too. Additionally, if you have a custom theme, then you will definitely want to back up these folders.

All your images and uploads go into the /wp-content/uploads folder. If you lose this folder, then you will not be able to recreate it. That’s why you must always back up this folder.

The wp-content folder is also where your other WordPress plugins may create their own folders.

Inside wp-content folder

Plugins like W3 Total Cache and WP Super Cache might create folders and files in your wp-content folder. You can safely ignore those files, as those plugins can regenerate those files.

However, other plugins like Envira Gallery create folders to store files for your image galleries. So, you must back up these folders.

Plus, you need to ensure that files you upload using plugins are not excluded from backups.

Backing Up WordPress Configuration Files

The WordPress configuration files contain important settings information for your WordPress blog. The two most important WordPress configuration files are:

  • wp-config.php
  • .htaccess

These files contain settings that are relevant to your WordPress site. They can be manually recreated, but it is safe to always add them to backups.

Backing Up WordPress Database

WordPress stores all the data in a MySQL database. This is where all your posts, pages, users, comments, and everything else is stored.

This is the most frequently updated part of your WordPress site. This is why you need to create database backups more frequently.

Why Not Just Back Up All WordPress Files and Database Every Time?

You should create a full backup of all your WordPress files and database at least once a month. For busier websites, you can create full backups once a week or even once a day.

However, you need to keep in mind that creating full backups is resource-intensive. If you are on shared WordPress hosting, then this could use up a lot of your server resources. It may result in a slow website or even make your site inaccessible.

Storing large backup files on the cloud will take up your storage space. Transferring large files can also be difficult for shared servers, which may result in unfinished uploads or corrupt backups.

Having said that, let’s look at an ideal strategy to back up your WordPress site.

Create Multiple WordPress Backup Schedules

The best way to set up a backup is by using multiple schedules. You can use a schedule like this:

  • Full WordPress backup each month
  • Partial WordPress backup every week
  • Database-only backup every day

Most WordPress backup plugins allow you to set up multiple schedules. For example, with the Duplicator Pro plugin, you can easily schedule WordPress backups.

First, you will need to go to Duplicator Pro » Schedules from your WordPress dashboard and click the ‘Add New’ button.

Create a backup schedule

On the next screen, you can enter a name for your schedule.

Duplicator Pro will also show an option to select a package template and choose which files to back up. We recommend leaving this setting as the default if you want a complete website backup.

Add a name for schedule and template

After that, you can scroll down and choose a storage location for your schedules.

There is also an option to select the frequency of your backups. For instance, if you want a full website backup every week, then you can change the ‘Repeats’ option to ‘Weekly’ and select the day for the backup to run.

Choose storage location and backup time

Next, you will need to scroll down and select the time to start the backup.

Once that’s done, just check the ‘Enable This Schedule’ option and click the ‘Save Schedule’ button.

Select a time and enable the schedule backup

That’s it. Duplicator Pro will run backups for your website at the scheduled time and day. You can add more schedules and backup profiles to make sure that your backups are not too bloated, can be reliably moved, and easily restored.

The best thing about Duplicator Pro is that it also helps you restore your backups. You just need to follow the wizard to recover your content and settings. For more details, please see our guide on how to restore WordPress from a backup.

We hope this article helped you learn which WordPress files you should back up. You may also want to see our complete guide to WordPress security and our expert picks for the best WordPress security plugins to keep your website safe.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Lượt xem: 16

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *