๐ WordPress Maintenance
It is important to keep WordPress updated for security and stability. Site administrators should backup the database regularly and before applying any updates.
Always backup your site before updating.
Manual Backup
- Put your site into maintenance mode.
- Use ftp to download all files, or if space is limited, the wp-config.php file and the wp-content folder.
- Use PhpMyAdmin to access the site database and export the db for backup.
Manual Restore (if needed)
- Download and unzip the latest version of WordPress to your local computer.
- If you were able to do a complete backup of your site, simply use ftp to upload the complete backup.
- If you only did a partial backup from above, use ftp to upload a new copy of WordPress and the backed-up version of the wp-config.php file and the wp-content folder.
- Use PhpMyAdmin to import the database backup file.
Updating WordPress
When an update is available for WordPress, an Update to x.x.x button will appear in the home page of the Dashboard. Click the button to automatically complete the update. If the automatic update does not work, you will need to do a manual update.
To perform a manual update, follow these steps.
- Download and unzip the latest version of WordPress to your local computer.
- Make sure you have backed up your database, wp-content folder and wp-config.php file from the server to your local computer.
- Delete the wp-admin and wp-includes directories on the server.
- Use ftp to upload all of the files from the unzipped WordPress folder to the server except the wp-config.php file and the wp-content folder.
- Upload the backed-up versions of the wp-config.php file and the wp-content folder to the server.
- Go to the WordPress admin site /upgrade.php to make sure all files are updated. If you need to update your database, it will give you a message.
- To update the database, use PhpMyAdmin to import the backed-up database.
Updating themes and plugins works essentially the same way. Automatic updates are best. If that doesn't work, uninstall and re-install from a new download.
Database Maintenance
WordPress database is the primary repository of your entire website. The database contains all posts, pages, plug-ins, themes, etc. It is very important to backup your database before updating and periodically just in case of a disaster. There are many backup plugins available to help you backup your full site, but many of them are for a fee. For this course, we will use the manual method to back up our sites.
Backups can be performed manually or automatically. It is a good idea to schedule regular backups. The frequency depends on the amount of activity on your site. For an active blog, daily backups may be desirable, while less active blogs may work fine with weekly or even bi-weekly backups. Just remember that any changes made to the site after the last backup will have to be manually re-entered if there is a problem with the site. You can still do manual backups in addition to the scheduled backups in cases where you update the software or plugins or have a significant boost in activity.
Troubleshooting WordPress
Themes and plugins can vary widely on functionality and compatibility. There may be times when you've updated your WordPress site to a new theme or plugin that causes your site to crash. During WordPress troubleshooting, youโll be often advised to deactivate all plugins and then re-activate them one by one. But what if you cannot access the WordPress admin area to deactivate the plugins? Thisย Troubleshooting WordPress article shows you how to easily deactivate all WordPress plugins when not able to access the wp-admin area.