How to Backup WordPress Site Manually?
Similar to have backup of important files on a computer, it is necessary to have a complete backup of your WordPress site. When an unforeseen situation happens like database is corrupted due to update, the backup data can be restored quickly. WordPress site backup is one of the popular business areas where developers compete heavily by offering different types of plugins for free as well premium. As a rule of thumb, it is recommended to avoid plugins when you have other options. In this article we will discuss in detail on how to backup WordPress site manually without plugins.
Why You Need to Backup?
Though disasters happen rarely, it will be an unforgettable moment if you are not prepared for that. Assume, one fine morning when you open a site and see a message that “Your Site is Hacked”. In most such scenarios your hosting company may not help in rescuing your site. Or you need to pay a hefty amount from your own pocket to scan and restore the content.
Important point to understand here is – though your data is stored on the hosting company’s server they will not own the bottom-line responsibility of protecting your data. It is your own duty to backup the data regularly and prepare for emergency situations.
What You Need to Backup?
Below are the steps involving backup your WordPress site manually and test the restore:
We will explain each steps in detail in the below sections.
Backing Up WordPress Database
The most important aspect of backing up a WordPress site is to copy all the content on the site. WordPress stores text content as MySQL database table entries while the medial files like images, videos, PDF, etc. are stored in a separate uploads folder. Here we explain with backing up database using cPanel hosting, the process will be similar if you are using different type of hosting account.
Login to your cPanel hosting account and look for phpMyAdmin icon under “Databases" or "Database Tools” section.
Click on the phpMyAdmin and login with your credentials (generally this will be the cPanel user id / password and you will be automatically login to phyMyAdmin).
You will see the list of databases on the left panel, click on the database you want to backup to expand the tables corresponding to that database.
Click on the “Export” tab and choose the following options.
- Export Method - click on the "Custom - display all possible options".
- Tables - choose the tables to be exported, generally select all the tables.
- Compression - choose the compression format as "gzipped". Size of the uncompressed database will be much bigger, hence choose "gzipped" or "zipped" compression option to make the download easier.
- Format - select the database format as "SQL".
Finally click on the “Go” button to download the complete database to your local computer.
Backup Site Files
The site files consist of media files, themes, plugins and WordPress core files come along with the installation package. Though you can download the files from “File Manager” option under cPanel hosting account, we highly recommend using FTP for faster downloading.
Once you have setup FTP account and installed FTP client on your computer, launch the software. If you have installed WordPress on the root directory (/public_html) then select all the files and right click to download to your local computer.
Restoring the Backup
As mentioned above, ensure to test whether the backed up database and site files can be restored without any issues. The easy way to test is to create a local WordPress installation which will also help to keep the complete backup of your live site on local computer. Check out our article on installing WordPress locally using MAMP and how to move live WordPress site to localhost.