February 1 2024

How to update plugins on WordPress on a production site avoiding errors and prolonged downtime

Effective WordPress update management: how to perform backups and rollbacks to maintain site stability and security

WordPress Plugin Update

Updating WordPress plugins is a routine operation for anyone managing a site, but it can hide pitfalls if not done carefully, especially in a production environment. Sometimes, the need for a quick update becomes necessary: ​​it may involve solving critical security problems or installing versions of plugins which, due to their history and reliability, are considered safe. However, it is always important to adopt some precautions to avoid errors and downtime, even when upgrading in a production environment.

1. Preparation: Backup and Caution

Before proceeding with any update, it is essential to make a complete backup of the site and database. This step is crucial not only as a precautionary measure, but also as a recovery strategy in case of problems, allowing you to restore the site to the previous version without significant data loss.

Making a backup means creating an exact copy of everything on the site: posts, pages, comments, settings, and the database, which is the beating heart of the site. The WordPress database contains everything from user information to blog posts and site settings. A regular and complete database backup is therefore essential.

In addition to the database, it is essential to back up all site files, including WordPress core files, themes, plugins, and uploaded media. This ensures that, in the event of a failed update or hacker attack, it is possible to restore the entire structure and contents of the site.

Filezilla FTP

As for backup methods, using protocols such as FTP or SSH is recommended. FTP (File Transfer Protocol) is a popular and accessible method that allows you to transfer files from your website to your local computer or external storage device. SSH (Secure Shell), on the other hand, offers a higher level of security, protecting data during transfer and managing large files more effectively.

Inherent in the MySQL Database, however, you can have PhpMyAdmin, a powerful web-based management tool that greatly facilitates working with MySQL databases. Through its intuitive interface, PhpMyAdmin allows you to perform a variety of operations, such as import, export and data manipulation. This tool is particularly useful for creating WordPress database backups, allowing administrators to easily perform backups and restores, thus ensuring greater security and flexibility in data management.

PHPMyAdmin

Keeping backups in a secure location, separate from the production server, is equally important. You can opt for cloud storage services such as Google Drive, Dropbox or Amazon S3, or for physical storage devices such as external hard drives. In either case, it is essential that these backups are accessible and protected from accidental loss or damage to the server.

Finally, it is prudent to also make a backup of the individual plugins, especially if we want to update only some and not all of them. This allows you to have a backup copy of each plugin in its current version, which can be invaluable in case of problems with new versions. It is a good idea to document the current version of each plugin and track the changes made in each update. This facilitates the rollback process and helps quickly identify possible causes of any problems that arose after the update. For critical plugins, such as those for e-commerce or member management, it is even more important to perform regular backups to ensure that essential site functionality can be quickly restored in the event of a serious malfunction.

2. The Update: Step by Step

Updating plugins in WordPress must be done carefully and methodically, proceeding only one plugin at a time. This approach allows you to isolate and precisely identify any problems that may emerge, allowing you to easily identify the specific plugin responsible for any malfunction.

After updating each plugin, it is essential to perform a thorough site test. This process includes testing the functionality of the backend and frontend, as well as analyzing whether the newly updated plugin is working properly. It is during this phase that any errors can emerge, which can manifest themselves in different ways.

One of the most immediate types of errors to recognize is that at the PHP level, which usually presents itself as an "internal error" or the words "A critical error has occurred on your website". These errors are often the result of compatibility issues or bugs within the plugin and are generally detectable immediately after the update.

WordPress Critical Error

Sometimes, after updating a plugin in WordPress, errors may occur that arise from different sources. One of the most common reasons is an error in the PHP code of the updated plugin. These errors may be due to bugs introduced by the developer in the latest version, which may cause malfunctions or conflicts within the site.

Another common cause of post-update problems is compatibility with other plugins installed on the site. WordPress plugins often interact with each other, and an update can change how one plugin interfaces with others. If an updated plugin is not compatible with the current versions of other installed plugins, this can lead to malfunctions or even blocking of the site.

Furthermore, the version of the PHP interpreter used by the web server can play a crucial role. If the server is running an outdated version of PHP, the updated plugin may not be compatible, as many plugin developers optimize their products for newer versions of PHP. Likewise, if the server uses a too recent version of PHP, some older plugins may not yet be updated to support it, thus causing compatibility issues.

However, there are errors that can be more subtle and less obvious. These errors occur even though the plugin appears to be working properly. They may include, for example, incorrect calculation of shipping costs, failure to send emails, or flaws in the site's business logic. Such errors are particularly insidious because they may not be immediately apparent and could cause significant long-term problems if the plugin is not fully and thoroughly tested in all its features and applications.

Therefore, it is essential to not only upgrade with caution, but also dedicate sufficient time to post-upgrade testing to ensure that every aspect of the site is working as intended and that no new problems have been introduced. This type of attention to detail is critical to maintaining the integrity and functionality of a WordPress site, especially in a production environment.

3. Plan B: Rollback

If serious problems emerge while updating a plugin, it is essential to have the possibility to perform a rollback, i.e. to return to the previous version of the plugin. The ability to do this efficiently and securely depends on the availability of backups taken before the upgrade. These backups, which include previous versions of the plugins, are essential to ensure a quick and safe recovery.

When a critical issue occurs, acting quickly is crucial to minimize the impact on site operations and user experience. The rollback process involves removing the problematic version of the plugin and replacing it with the previous version, recovered from the backup files. This step should reverse any problems introduced by the update and return the site to normal functionality.

This rollback procedure is an important security measure in the process of managing and maintaining a WordPress site. It allows site administrators to manage updates with greater confidence, knowing they can quickly revert if the update doesn't go as expected. Ultimately, the ability to perform efficient and reliable rollback reduces the risk of prolonged downtime or persistent site issues, thus ensuring more stable and secure management.

Conclusions

Updating WordPress plugins in a production environment requires attention, preparation and caution. By following these steps and recommendations, you can reduce the risks of errors and downtime. However, it is always recommended, whenever possible, to test in a staging environment before proceeding with the upgrade in production. The security and stability of a WordPress site is highly dependent on these processes, so it is essential to take a methodical and thoughtful approach.

Do you have doubts? Don't know where to start? Contact us!

We have all the answers to your questions to help you make the right choice.

Chat with us

Chat directly with our presales support.

0256569681

Contact us by phone during office hours 9:30 - 19:30

Contact us online

Open a request directly in the contact area.

INFORMATION

Managed Server Srl is a leading Italian player in providing advanced GNU/Linux system solutions oriented towards high performance. With a low-cost and predictable subscription model, we ensure that our customers have access to advanced technologies in hosting, dedicated servers and cloud services. In addition to this, we offer systems consultancy on Linux systems and specialized maintenance in DBMS, IT Security, Cloud and much more. We stand out for our expertise in hosting leading Open Source CMS such as WordPress, WooCommerce, Drupal, Prestashop, Joomla, OpenCart and Magento, supported by a high-level support and consultancy service suitable for Public Administration, SMEs and any size.

Red Hat, Inc. owns the rights to Red Hat®, RHEL®, RedHat Linux®, and CentOS®; AlmaLinux™ is a trademark of AlmaLinux OS Foundation; Rocky Linux® is a registered trademark of the Rocky Linux Foundation; SUSE® is a registered trademark of SUSE LLC; Canonical Ltd. owns the rights to Ubuntu®; Software in the Public Interest, Inc. holds the rights to Debian®; Linus Torvalds holds the rights to Linux®; FreeBSD® is a registered trademark of The FreeBSD Foundation; NetBSD® is a registered trademark of The NetBSD Foundation; OpenBSD® is a registered trademark of Theo de Raadt. Oracle Corporation owns the rights to Oracle®, MySQL®, and MyRocks®; Percona® is a registered trademark of Percona LLC; MariaDB® is a registered trademark of MariaDB Corporation Ab; REDIS® is a registered trademark of Redis Labs Ltd. F5 Networks, Inc. owns the rights to NGINX® and NGINX Plus®; Varnish® is a registered trademark of Varnish Software AB. Adobe Inc. holds the rights to Magento®; PrestaShop® is a registered trademark of PrestaShop SA; OpenCart® is a registered trademark of OpenCart Limited. Automattic Inc. owns the rights to WordPress®, WooCommerce®, and JetPack®; Open Source Matters, Inc. owns the rights to Joomla®; Dries Buytaert holds the rights to Drupal®. Amazon Web Services, Inc. holds the rights to AWS®; Google LLC holds the rights to Google Cloud™ and Chrome™; Microsoft Corporation holds the rights to Microsoft®, Azure®, and Internet Explorer®; Mozilla Foundation owns the rights to Firefox®. Apache® is a registered trademark of The Apache Software Foundation; PHP® is a registered trademark of the PHP Group. CloudFlare® is a registered trademark of Cloudflare, Inc.; NETSCOUT® is a registered trademark of NETSCOUT Systems Inc.; ElasticSearch®, LogStash®, and Kibana® are registered trademarks of Elastic NV Hetzner Online GmbH owns the rights to Hetzner®; OVHcloud is a registered trademark of OVH Groupe SAS; cPanel®, LLC owns the rights to cPanel®; Plesk® is a registered trademark of Plesk International GmbH; Facebook, Inc. owns the rights to Facebook®. This site is not affiliated, sponsored or otherwise associated with any of the entities mentioned above and does not represent any of these entities in any way. All rights to the brands and product names mentioned are the property of their respective copyright holders. Any other trademarks mentioned belong to their registrants. MANAGED SERVER® is a trademark registered at European level by MANAGED SERVER SRL, Via Enzo Ferrari, 9, 62012 Civitanova Marche (MC), Italy.

JUST A MOMENT !

Would you like to see how your WooCommerce runs on our systems without having to migrate anything? 

Enter the address of your WooCommerce site and you will get a navigable demonstration, without having to do absolutely anything and completely free.

No thanks, my customers prefer the slow site.
Back to top