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

Which WordPress Files Should You Backup? And the Right Way to do it

Often we get asked which WordPress files should I backup? Having an up to date WordPress backup protects you against unexpected server failures and hacks. However you don’t to backup every file if you don’t want to. In this article, we will tell you which WordPress files are important to backup and the right way to do it.

Which WordPress files to backup

Why Setup a WordPress Backup?

All websites on the internet are vulnerable to hacking attempts, DDOS attacks, data theft, and data loss. This could happen to even the most secure 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. Until they come across an accident and realize how easy it would have been if they had a backup.

What’s the Best Way to Create WordPress Backups?

The best way to setup a backup is by using an automated backup system.

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

If you have the budget, then we recommend using VaultPress. It automatically syncs your changes, keeps daily backups with security scans and easy restore. We use VaultPress for all our WordPress projects.

However most owners don’t like paying a monthly fee. That’s why we recommend using BackupBuddy. It is the most popular WordPress backup plugin in the market. See our tutorial on how to keep your WordPress content safe with BackupBuddy.

Remember, you will only have to setup a backup solution once. After that, it will automatically create backups for you.

Which WordPress Files to Backup?

Your WordPress site has three kind of files and one database.

  • Core WordPress Files
  • Files in the wp-content Folder (your theme, plugins, and uploads)
  • WordPress configuration files
  • Your WordPress Database

Backing up Core WordPress Files

Core WordPress files are the files that run your WordPress site. You normally would 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 wp-admin folder.

You can always get fresh copes of these files from website. This is why you don’t always need to backup these files.

Core WordPress Files

Backing up wp-content Folder

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

If you know what plugins and theme you had installed on your WordPress site, then you can always get fresh copies of these plugins and themes from their sources. In that case, you don’t need to backup plugins and themes folders.

If you can’t remember all the plugins or the theme you had installed, then you should backup these folders too. If you have a custom theme, then definitely backup these folders.

All your images and uploads go into /wp-content/uploads folder. If you lose this folder, then you will not be able to recreate it. You must always backup this folder.

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

wp-content folder

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

However, plugins like Envira Gallery create folders to store files for your galleries. You must backup these folders.

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 website. 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 Backup All The Files and Database Everytime?

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 hog your server resources. It may result in a slow website or may even make your site inaccessible.

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

Having said that, let’s see what should be an ideal strategy to backup your WordPress site?

Create Multiple WordPress Backup Schedules

The best way to setup a backup is by using multiple schedules. You can create multiple backup schedule like this:

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

Most good WordPress backup plugins allow you to setup multiple schedules. We will show you how to do that in BackupBuddy. For other plugins, check their documentation for instructions.

Login to your WordPress admin area and then click on BackupBuddy. You will see your backup schedules listed there.

If this is your first time using BackupBuddy, then it will automatically take you to quick setup wizard.

quick setup wizard in BackupBuddy

Follow the on-screen instructions and BackupBuddy will create your first complete backup.

After that come back to BackupBuddy » Backups page. You will notice two buttons for database-only and complete backups.

Click on the plus icon next to them to add a new backup profile.

Add new backup profile button

Next, you will you see two fields. Choose ‘Files only’ from the dropdown menu and then provide a name to this backup profile, e.g. Partial Backup.

Setup and Add Backup Profile

After that you need to click on the gear icon next to your newly created profile.

Customize your backup profile

This will bring up a popup where you can customize how this profile creates backups.

First you need to uncheck the box next to ‘Use global defaults for files to backup?’ option. This will show you WordPress files and folder structure.

customizing backup profile

Simply take your mouse to folder and files you want to exclude, and then click on the minus button. Repeat to improve wp-includes and wp-admin folders, files in root folder, and plugin created files inside wp-content folder.

Click on the Save profile settings button when you are done.

Now you need to visit BackupBuddy » Schedules page to add a new schedule.

Give this schedule a name and then select your backup profile. After that you can choose a backup interval. BackupBuddy lets you choose from a range of options starting from once hourly to once yearly.

Adding a new schedule

For partial files backup, we recommend once or twice a week schedule.

Click on the remote destination button to select where to save the backup. Click on the add new schedule button to save your changes.

That’s all, BackupBuddy will now create a partial backup of your files based on the schedule defined by you.

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.

We hope this article helped you learn which WordPress files should you backup? And the right way to do it. You may also want to see our 13 vital tips and hacks to protect your WordPress admin area.

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.

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

9 CommentsLeave a Reply

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


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

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

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

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

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