Beginner's Guide for WordPress / Start your WordPress Blog in minutes

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

Are you wondering which WordPress files you need to back up on your website?

Having an up-to-date WordPress backup protects you against unexpected server failures and hacks. However, you don’t have to back up every file if you don’t want to.

In this article, we will tell you which WordPress files are important to back up and the right way 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 allows you to 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?

There are several ways to back up your WordPress site. However, the best way to set up a backup is by using a WordPress 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 make any changes to 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 make sure that files that you have uploaded 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:

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 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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

10 CommentsLeave a Reply

  1. Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Hello, to be more specific about manual backup it would be correct to tell to download all the files under “public_html” folder? Am i right?
    I have a hosting solution that gives me multiple folders (etc, logs, mail, public_ftp, public_html, ssl, tmp, www), but if i want to manually restore the website should i have to upload only the “public_html” folder?
    Thanks in advance

    • If that is where your site is installed, as we state in the article, the files you need to download are the core WordPress files which include all files in the root folder, wp-includes, and wp-admin folder.

      Admin

  3. Sir when i update my wordpress any page (like Home/About us etc..) then page without update, automatically all post section of wordpress open.

    please tell me how can i solve this probleam?

  4. Coming from the Joomla world a big name there is Akeeba, which also has a version for WordPress.
    I have been succesfully using it on WordPress sites. It also has an option to start a backup from outside the backend (with wget).

  5. There are two parts to backing up your WordPress site: Database and Files.

    This section talks about Files only.
    Your WordPress site consists of the following files:

    WordPress Core Installation
    WordPress Plugins
    WordPress Themes
    Images and Files
    Javascripts, PHP scripts, and other code files
    Additional Files and Static Web Pages

    Everything that has anything to do with the look and feel of your site is in a file somewhere and needs to be backed up. Additionally, you must back up all of your files in your WordPress directory (including subdirectories) and your .htaccess file.

    While most hosts back up the entire server, including your site, it is better that you back up your own files. The easiest method is to use an FTP program to download all of your WordPress files from your host to your local computer.

    By default, the files in the directory called wp-content are your own user-generated content, such as edited themes, new plugins, and uploaded files. Pay particular attention to backing up this area, along with your wp-config.php, which contains your connection details. The remaining files are mostly the core files, which are supplied by the WordPress download zip file.
    If you need to back up your WordPress database, see the Backing Up Your Database.
    Rehan Kohli

    • but what if i just need my contents to be transfered and not the main core files since i can reinstall my theme. the reason is because of the use of my site by spammer and malware threats i have getting from my hosting but it is not stopping no matter what i do.

  6. I have used back up buddy once, but most time i like to use All-in-One WP Migration. It is so easy to change domain, hosting and create a full backup.

  7. Thanks! As you said it is so quick and simple to install these plugins but are usually overlooked.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.