The Home of the Security Bloggers Network
Home » Security Bloggers Network »
It’s important to understand the most fundamental WordPress tasks when running your site. Security, of course, should be one of your primary considerations. Creating a manual WordPress backup should also be in your toolbox. You should use a dedicated backup plugin or online service to automatically back up your website.
However, by knowing how to manually backup your website you’ll get a better understanding on how your website works. Also, the manual approach can save your bacon if you for example can’t access your WordPress dashboard or online service. Accidents happen, so as such, it’s a good method to learn.
This post is going to show you how to manually backup (and restore) your WordPress website. Before this, let’s talk about your WordPress installation under the hood, and why an automated approach is the best.
For the uninitiated, a WordPress backup is simply copying your site’s files and database from one location to another. There are a few solid reasons why you’d want to make regular backups:
However, using WordPress often means installing plugins to help automate daily tasks. If you’re wondering why this is a better way to backup your site, the next section will explain.
An out-of-the-box WordPress installation – it’s ‘core’ – is pretty bare. This is by design. If you wish to change the look of your site, installing a theme is how you achieve it. If you want to extend your site’s functionality, you’ll install plugins.
While plugins can achieve many things on your site, automating complex tasks is one of the best ways to use them. Backing up your site suits automation for a few reasons:
Regardless, you’re likely using plugins for many different WordPress tasks already. However, if your WordPress website is hacked, you won’t have access to WordPress’ usual methods of working with files. Given this, learning how to backup manually is another arrow in your quiver.
We’ll split the manual backup into two parts: The second will look closer at your database. However, before this, the first part will deal with your themes, plugins, and media. Let’s take a look!
First off, there are a number of files you’ll need to back up. Fortunately, you don’t need to save all of them, as the WordPress core files can be redownloaded.
Before you begin, you’ll need the following in place:
Once you have these, log into your site through your SFTP client, and check out your list of files in the www or public_html directory:
If you have more than one site, you’ll find some of your other sites in dedicated folders, although the file structure is the same. Rather than scan all of the files here, you’ll only need to find the following:
In a nutshell, the first file contains your site’s specific configuration settings, including the connection string the WordPress application uses to connect to the database. The wp-content folder is where your themes, plugins, and media files live.
The job here is simple: Drag the file and folder to a safe location! Once you’ve done this, the first part is over.
Backing up your database is a bit more complex than your site’s folders and files, mainly because you’ll need to connect to the database server. For this, you’ll also need:
Once you have these to hand, check out the two different backup methods below. Feel free to gravitate to the option that suits you, as they all reach the same goal.
Using a GUI to access your WordPress database makes working with it straightforward, and there are a number of tools available. Your host will often provide either phpMyAdmin or Adminer.
The tool’s location will vary depending on your host, but will usually be clearly labelled as such:
Once you’re in, you’ll find a list or drop-down showing your site’s database somewhere on the left-hand side:
Here, choose the database that corresponds to your website’s name:
Next, click the Export link for the database, and if prompted, go with a custom export. On the Export screen, choose UTF-8 encoding if given the option, and choose a GZIP output option (again if you can):
Finally, click Export and save the file to your computer.
Many users underutilize the functionality found within their hosting control panel. Regardless, you’re able to backup your databases from many hosting administration panels. Many hosts use cPanel, but there are also custom dashboards available.
You’ll have to check with your particular host whether you’re able to manually back up databases. Some offer a clear set of instructions for downloading your database. In contrast, others don’t let you manually download databases unless it’s part of a site-wide manual backup.
In any case, there will be an option to backup your site, clearly marked on your host’s back end. If you’re using cPanel, it’s often the Backup Wizard within the Files section:
From here, you’ll want to click the Back Up button, which will lead onto the Full or Partial Backup section:
Finally, click both the MySQL Databases and Email Forwarders & Filters links, then on the specific links on the next page to download your database and files:
Note that you could also download your Home directory for completeness, but it’s not necessary. Alternatively, you could skip the file backup step from earlier, and download your themes, plugins, and media from here too, if the option is available to you.
Before we look at restoring your WordPress website from a backup, let’s give you a few pointers on storing your backups securely. We’d recommend not to do the following:
Instead, we follow the ‘rule of three’ – store three copies of the backup in three separate places. One should be in a secure cloud storage solution, and one should be on a removable drive. The third can be in a format of your choosing, but must be kept separate from the other backups.
The good news is that if you’re in the position where you need to restore your WordPress website, the process is almost a reverse to backing it up. While we’ve covered much of the details throughout this article, it’s worth running over the broad steps you’ll need to take:
You’ll likely find the restoration process much easier than the backup, as you’ll have already completed each action the first time around.
However, once you’re done, there are two ‘cleanup’ steps to carry out. First, delete the .SQL backup file from your root server, and set the right permissions on your files, folders, and database.
Site backups are a crucial and fundamental process you should implement. They should always be included in your WordPress security program. A manual approach to backups can help you when you can’t access your dashboard.
What’s more, you can learn a lot about your installation from making a manual WordPress backup. So while you should use a plugin or online service to backup your website, do the occasional manual backup.
This post has outlined a number of aspects of manually backing up your WordPress site. You’ll need to consider backing up your themes, plugins, media, and database. For the latter, there are a few methods you can use. Of course, securely storing your backups and knowing how to manually restore them should also be key concerns for you.
The post How to manually backup your WordPress website without a plugin appeared first on WP White Security.
*** This is a Security Bloggers Network syndicated blog from WP White Security authored by Tom Rankin. Read the original post at: https://www.wpwhitesecurity.com/manual-wordpress-backup-without-plugin/
document.getElementById( “ak_js” ).setAttribute( “value”, ( new Date() ).getTime() );