Quantcast
Channel: wordpress backup Archives - WP White Security
Viewing all articles
Browse latest Browse all 19

WordPress Backup Blueprints for Manual WordPress Backup

$
0
0

WordPress backup is the most overlooked task in maintaining a WordPress. Any blogger or webmaster should backup WordPress frequently to ensure that the WordPress can be restored and recovered in the shortest time possible in case of a failure, or in case it is hacked. The sooner you can recover your WordPress, the less the business is interrupted.

In this article we will explain the basics of the WordPress setup so to explain how to make a manual WordPress backup. If you are looking for a fully automated WordPress backup solution, we recommend you the WordPress backup plugin Backup Buddy.

The basics of a WordPress Installation – How it works

WordPress is a simple database driven php web application. So for a complete WordPress backup all you need to do is;

  1. Backup the WordPress blog and website files which contain the WordPress web application files, WordPress theme/s files, plugins files and your uploaded content. Typically all these files are found in the root of your website.
  2. Backup the WordPress MySQL database where the content, user information, passwords and privileges, website settings, theme settings, WordPress plugins settings etc are stored. The WordPress database name can be found in the wp-config.php file in the root of your WordPress.

Backup WordPress, themes, plugins and uploads

The files in your public_html directory, or where the website files are stored on your web server should be backed up because they contain:

  1. The WordPress core installation files
  2. WordPress themes and plugins you have installed
  3. Images and files you uploaded as part of your content
  4. All code files such as JavaScripts, php etc
  5. Additional files which you might have added manually, such as static pages etc

All of these files together make up your website and blog. To backup all these files you can use the ‘Backup’ option from your hosting provider CPanel. Alternatively, you can access your website using an FTP client and download all the files to your computer.

Once you download all the files, store them in a secure and safe place. Ideally such files should be stored on a separate media.

WordPress Database backup

Backup your WordPress database from CPanel

  1. Login to your hosting provider CPanel and click on the Backup icon in the Files section.
  2. Once in the backup options page, click on the WordPress database name listed under the section ‘Download a MySQL Database backup’.
  3. Once you click on the WordPress database name, a compressed SQL script file is automatically downloaded to your computer.

Store the WordPress database file in a secure place and ideally it should be stored on a different media.

Backup WordPress database using MySQL command line

If you host your own web server and have access to it via SSH or other protocol, you can make a database backup using a MySQL standard tool called mysqldump. As the name implies, the mysqldump tool dumps a MySQL database into a text file which can later be used to restore the WordPress database.

In the below example, we are using the MySQL root user to connect to the MySQL server, selecting the wpdatabase database and exporting it to a text file called wpdb_backup.sql.

 Mysqldump –u root –p wpdatabase > wpdb_backup.sql
 

Below is a breakdown of the switches and parameters used in the command:

-u is used to specify the username to connect to the MySQL server.

-p is used to specify a password. If no password is specified in the command line like in the above example, the MySQL server will prompt you to specify the password once you issue the command. For security reasons it is better not to specify the password via command line since it will be stored in the command line history.

Wpdatabase is the actual WordPress database name.

> This sign means export. It is used to specify where to export the MySQL server database dump.

Wpdb_backup.sql is the name of the file where the database dump will be stored. If the file does not exist it will be generated by the tool. Once the database is dumped into this file, download it to your computer and store it in a secure location, ideally on a separate media.

Backup WordPress database using phpMyAdmin

phpMyAdmin is a MySQL Server admin web based tool. This can be accessed directly via a specific URL or else from your hosting provider’s CPanel under the Databases section. To backup the WordPress database from the phpMyAdmin follow the below procedure:

  1. Once logged in to phpMyAdmin, depending on your installation you might notice that you have several databases. In that case, select the WordPress database by clicking on it.

Select WordPress database from phpMyAdmin

  1. Once you select the WordPress database you are redirected to the database options page form where you can launch several database related tasks. As seen in the below screenshot, a list of tables in the database will also be populated. You might have more than 11 tables in your WordPress database, if you have WordPress plugins that store data in the WordPress database.

WordPress database tables list page and options

  1. Click on the Export option (highlighted in the above screenshot) to export/backup the WordPress database to a file. From the Export section, select Custom export and ensure that the below options are selected as highlighted in the below screenshot:
    1. All tables are highlighted.
    2. The option “Add Drop….” from the Object Creation options is enabled. This can be useful in case you are restoring the WordPress database onto an existing one.

MySQL WordPress database custom export options

Useful Tips for Storing your WordPress Backup

The WordPress backup files contain sensitive data, such as the WordPress administrator credentials. Such files should be stored in a secure location where other users do not have access to. You can also compress the WordPress backups into a password protected zip file so in case someone manages to get a copy of your WordPress backup files, he or she would need a password to access the content.

You should also keep multiple copies and save them on a different media, such as an external drive or USB stick in case your computer breaks down or is infected with malware.

The post WordPress Backup Blueprints for Manual WordPress Backup appeared first on WP White Security.


Viewing all articles
Browse latest Browse all 19

Trending Articles