• 💂 Personal Website:Hai Yong — a blogger who likes to share technology and happiness
  • 🤟 copyright: this article by [sea] original, in nuggets first, need to reprint please contact the blogger
  • 💬 If the article is helpful to you, welcome to follow, like, bookmark (click three links) and subscribe
  • 💅 To find friends to fish together, please click on [Fish game】

Make writing a habit together! This is the 11th day of my participation in the “Gold Digging Day New Plan · April More text Challenge”. Click here for more details.

WordPress is a complete repository where we use forms, databases, and other variables to maintain and organize our website information. Therefore, it is highly recommended that you back up your files and databases regularly or before any upgrades during site administration.

WordPress is the most reliable Web-based and database-driven content management system out there, and the act of backing up your database is critical to protecting your hard work, time, money, and effort.

This habit protects site data and helps recover it in the event of a problem or accident, even in a highly secure setting.

In short, because WordPress is prone to bugs and damage, there is a high sense of responsibility for site security and maintenance that requires regular backups.

Why make a backup

Let’s look at some important reasons to take a WordPress database backup:

  • In adverse circumstances, such as site hacking, server crashes, system errors, or sudden deletions.
  • Backups help to easily access and recover data for personal use when a hosting company has suspended a user account.
  • Backups are helpful when a hacker injects unwanted data into a database. Backups help clean up unwanted data or tables.
  • Due to server hacking or using incompatible plug-ins, the site owner may lose some data or the site may become corrupted. If we know that the site is restored to its original state with the help of backups, the situation will be handled in a safe manner.
  • In e-commerce sites, all important data should not be lost in transaction tracking.
  • Make backups to protect against external threats, unforeseen developer errors, corrupted databases, web site outages, or any other malfunctions.
  • The process involved in exporting and importing the site database during site migration may lose some data that can be recovered through backup.

Why can’t I rely on hosting company backups

We can’t rely on hosting company backups for the following reasons:

  • Most hosting companies’ backups are not designed specifically for WordPress. This can lead to some incompatibility issues.
  • A company’s backup plan may not meet all the recovery requirements of a sudden disaster.
  • Restoring a single site can be a tedious task without restoring all of the sites for a user account.
  • Users may not receive any notification of backup failure.

Note: For more security, users should maintain their backup solutions using any tools designed specifically for WordPress.

Factors to consider

Factors to consider before deciding on any backup solution:

  • Automation capabilities: It should be able to automate WordPress backups.
  • Backup frequency: Users should check how often backups are performed if it is sufficient to meet recovery requirements.
  • Storage location: If your solution supports cloud storage like Google Drive or Dropbox, that’s good enough.
  • Resilience: Users should look for the convenience of restoring files and databases to our system.
  • Partial or full backup: Some backup solutions save only the database, although the full site data is stored. It’s always better to look for a full backup.
  • Site migration: wordpress migration should be available.

Note: During site migration, users may encounter unsupported web hosts, incomplete migration, and large site outages.

A complete backup of your WordPress site

For a full backup of any WordPress site, you need the following:

  • WordPress Blog content
  • WordPress files
  • All configuration files in the root directory
  • Home directory containing site themes, plug-ins, and uploaded content.
  • MySQL database, consisting of posts, drafts, tag information for posts, and comments.
  • Forwarded E-mail messages, E-mail filters, and their configuration.
  • The Settings of your site.
  • Details of registered users of the site.

Different ways to use WordPress backups

You can manually or programmatically back up any WordPress site or database using any off-the-shelf plug-in.

1. Use the cPanel

CPanel is just a simple interface for securely managing and backing up your WordPress site. Automatic backups can be scheduled here. Log in to the control panel of the corresponding Web host, and then select the Backup Wizard option under the Files section.

1. In cPanel, log in to the hosting account back end and naively enter the file manager section. Internally, we provide full or partial backup options as needed. Note: Partial backup is more reliable because it allows the user to restore his database if he is on the same host.

2. Run the following command:

mysqldump -u [username] -p[password] [DBname] > backupFile.sql
Copy the code

Where username is the MySQL username, password is the MySQL password, DBname is the database that you want to backup, and backupfile. SQL is the name of the SQL file that saves the backup script. By default, Backupfile.sql is stored in the same folder as the command.

Note: In command line syntax, leave some space before [username], but not before the [password] argument. When the user wants to restore the database, replace the > in the command line syntax with <, as follows:

mysqldump -u [username] -p[password] [DBname] backupFile.sql
Copy the code

3. Use phpMyAdmin * *

If the WAMP or XAMPP server is running on a Linux-based operating system, phpMyAdmin is pre-installed. In other cases, you must install phpMyAdmin and configure it to manage database dumps. After a successful installation, log in to the phpMyAdmin tool by entering login credentials.

After logging in, we have all the tables in the left column of the dashboard screen.

Next, the user must select the WP prefix database option for the WordPress database from the left. After you select the database, select the Export TAB.

By clicking on a WordPress database or any database name, the user can expand to list all the tables that exist in that particular database. There are two methods for exporting backup files. They are as follows:

  • Fast – Shows only the smallest options:

Users can choose the default SQL format or choose any other format such as CSV or PDF to save your WordPress database. Click the Start button to complete the last step to save the backup file.

  • Customization – Displays all possible options: The user can select format specific options and many other options in this customization option.

Note: If backup is the primary goal, SQL, CSV, and XML are the preferred formats for backup files.

4. Use WordPress plugins

A backup plugin is a safe and quick choice for backing up your WordPress site database. This is the easiest way to ensure that your site’s database is fully recovered. Most of the plug-ins available on the market are easy to use, lightweight, and well-documented. Some of them are as follows:

  • All-in-One WP Migration
  • BlogVault
  • WP Database Backup
  • WP Remote
  • Import Export WordPress Users

4. Manually back up data periodically

Create a target folder for making a WordPress database backup to download the required files. It is better to create a new folder for each backup. It allows users to be more organized and productive when they want to recover from a backup.

5. Use the file transfer protocol

You can create and select a new folder in the FTP client dashboard. Download the WordPress file or required data located on the server. This can be done using an FTP client such as FileZilla.

FileZilla is a free, open source, reliable and powerful tool for transferring files to servers. In FileZilla, navigate to the right quadrant, and then select the public_HTML folder for the entire content of the site. The public_html folder is also called WWW, and the root folder is named after your site. To log in to the FTP client, a user needs a host name, user name, password, and port. Click the Quick Connect button to connect to the server.

Once the connection is established, it simply gives a message “Directory list successful…” . The user should be able to find his website folder on the right side of the Remote Sites: panel. Select files and folders from the server that the user can drag and drop to the local system on the left side of the panel. The left side of the panel actually shows the local system files and folders.

Depending on the size of your site, exporting your WordPress database can take some time.

Other methods for backing up your WordPress database

  • Restore your WordPress database on any cloud service using automatic plug-ins.
  • With a plugin like BackupBuddy, it’s automatically stored on Google Drive and many other cloud services.
  • An automatic backup system installed on a user’s web site.
  • Use your own manual scripts.
  • Use your web hosting company’s own backup system.
  • Sends a copy of the user backup file to a remote location.
  • Make regular backups according to a full daily or weekly backup schedule.

Conclusion: A web site is a huge asset for both site managers and users, so it’s worth protecting and having a good enough backup solution. Therefore, the decision to restore the entire system to its original position was critical. This can be done by running a backup of your WordPress database on a regular basis and should not be ignored at all costs. WordPress backups should be done in a way that eventually fully restores your site.