Reliability Edit

Once your site is up, how do you keep it that way? And what can you do if it goes down? In most cases, the same best practices apply to WordPress as with other web applications, but some differences and recommendations are detailed here.

BackupsBackup A backup is a copy of computer data taken and stored elsewhere so that it may be used to restore the original after a data loss event. Backups can be used to recover data after its loss from data deletion or corruption, or to recover data from an earlier time. Backups provide a simple form of disaster recovery. Backups

A WordPress site is composed of three (3) main components: Code WordPress coreCore Core is the set of software required to run WordPress. The Core Team builds WordPress., zero (0) or more plugins, and one (1) or more themes Assets Typically images, documents and other user-upload files. This can also contain pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory or can be cost-based plugin from a third-party. or themeTheme A theme dictates the style and function of your WordPress website. Child Themes derive from the main parent theme. cacheCache A cache is a component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere. and/or configuration files as well. DatabaseDatabase A database is an organized collection of data. Access to this data is usually provided by a "database management system" (DBMS) consisting of an integrated set of computer software that allows users to interact with one or more databases and provides access to all of the data contained in the database. Because of the close relationship between them, the term "database" is often used casually to refer to both a database and the DBMS used to manipulate it. A set of tables containing your posts, pages, comments, links, settings, and other data.

Your WordPress database contains user-generated content and configuration, including every post, every comment and every link you have on your website. If your database gets erased or corrupted, you stand to lose everything you have written. There are many reasons why this could happen and not all are things you can control. With a proper backupBackup A backup is a copy of computer data taken and stored elsewhere so that it may be used to restore the original after a data loss event. Backups can be used to recover data after its loss from data deletion or corruption, or to recover data from an earlier time. Backups provide a simple form of disaster recovery. of your WordPress database and files, you can quickly restore things back to normal.

It’s recommended to keep and test regular backups of your WordPress sites using the system-level backup or snapshotSnapshot A snapshot is the state of a system at a particular point in time. It can refer to a system snapshot copy of the state of a system or to a capability provided by certain systems. infrastructure of your choice. One thing to be aware of is that the code, assets and database change in conjunction with WordPress but may be backed up separately. For this reason, it is a good idea to keep restore points that include backups of code, assets, and database taken at the same point in time. It’s recommended to create restore points before any critical action, e.g. WordPress core update.

Top ↑

MonitoringMonitoring Website monitoring is the process of testing and verifying that end-users can interact with a website or web application as expected. Website monitoring is often used by businesses to ensure website uptime, performance, and functionality is as expected. Monitoring

Site monitoring systems and services can notify you when your site isn’t working properly. They can often correct any minor issues, or help you to do so before they become major issues.

Top ↑

Uptime Monitoring Uptime Monitoring

Uptime monitoring is traditionally done at the serverServer A server is a piece of computer hardware or software that provides functionality for other programs or devices. Typical servers are database servers, file servers, mail servers, print servers, web servers, game servers, and application servers. level or by checking one or more URLs on the site at regular intervals to make sure they are responding properly. A combination of internal and external uptime monitoring is ideal for users, and there exist a variety of software and services to handle this for you.

Top ↑

Performance Monitoring Performance Monitoring

While a site’s services may be responding, to a user, a site being “up” means more than this to them. Performance monitoring is similar to uptime monitoring, but also takes note of certain metrics that could indicate trouble. Metrics like “page load time” and “slowest average transactions” should be monitored and reported regularly to help keep you ahead of performance issues. Monitoring slow logs for problematic queries or requests can also help keep user sites stable. MySQLMySQL MySQL is an open-source relational database management system (RDBMS). MySQL is free and open-source software under the terms of the GNU General Public License., PHPPHP PHP (PHP: Hypertext Preprocessor) is a general-purpose scripting language especially suited to web development. PHP code is usually processed on a web server by a PHP interpreter. On a web server, the result of the interpreted and executed PHP code would form the whole or part of an HTTP response.-FPM, and others provide options to capture these for monitoring.

Top ↑

Performance Profiling Performance Profiling

It is best practice to use performance profiling tools, such as New Relic, AppDynamics or Tideways, to diagnose the performance bottlenecks of your website and infrastructure. These tools will give you insight such as slow performing functions, external HTTPHTTP The Hypertext Transfer Protocol (HTTP) is protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, where hypertext documents include hyperlinks to other resources that the user can easily access, for example by a mouse click or by tapping the screen in a web browser. requests, slow database queries and more that are causing poor performance.

Top ↑

Version Control Version Control

Version control is a way of tracking the changes made to files over time by different people, such as the code for a website or another application. It allows people to track the revision history of code and to revert or apply changes easily via the command line. It is also a good way to debug your website if something goes wrong, as you can quickly restore to a previous state of the site’s code without restoring from a full backup.

A lot of WordPress hosts offer version control but there are third-party services and self hosted options as well.

Note: If you’re interested in improving this handbook, check the Github Handbook repo, or leave a message in the #hosting-community channel of the official WordPress Slack.

Top ↑

Changelog Changelog

  • 2021-05-27: Fixing infoboxes
  • 2021-02-17: Changelog added.
  • 2020-11-23: Minor text changes and info-block.
  • 2020-06-02: Published from Github.

Last updated: