WordPress is a free and open-source content management system (CMS) based on PHP and MySQL. WordPress is reportedly the easiest and most popular website management or blogging system in use on the Web, supporting more than 60 million websites. Configure our agent and check WordPress performance using a wide variety of metrics.
This document details how to configure the WordPress plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of WordPress servers.
WordPress performance monitoring metrics:
Take informed troubleshooting decisions by keeping track of critical WordPress metrics including:
"apache_version" mentions the version of Apache running on the server. Important in understanding which Apache features are available and whether an update is required or not.
Use the metric "apache_status" and note down the status of Apache server in your WordPress server.
The version of PHP running in your WordPress server is noted down using the metric "php_version". Important in understanding which PHP features are available and whether an update is required or not.
The metric "php_cpu" gets the portion of CPU occupied by PHP processes specific to your WordPress server. It is displayed as percentage on the dashboard.
"mysql_version" mentions the version of MySQL database running in your WordPress server. Important in understanding which MySQL features are available and whether an update is required or not.
Use the metric "php_status" and get the current status of PHP process in your WordPress server.
Status of MySQL database in your WordPress server is obtained using the metric "mysql_status".
The portion of memory occupied by PHP processes specific to your WordPress server. "php_mem" is displayed as percentage on the dashboard.
The portion of memory occupied by MySQL queries specific to your WordPress server. "mysql_mem" is displayed as percentage on the dashboard.
Apache CPU load
The metric "apache_cpu" measures the portion of CPU used by all Apache worker threads combined. It is displayed as percentage on the dashboard.
The portion of CPU occupied by MySQL queries specific to your WordPress server. "mysql_cpu" is displayed as percentage on the dashboard.
Apache total accesses
Use the metric "apache_total_access" and get the total number of times your Apache server was accessed.
Apache total bytes
The total number of bytes count served by your Apache server is measured using the metric "apache_total_bytes".
Apache requests per second
Get the average number of requests per second recieved by the Apache server with the metric "apache_req_per_sec".
Apache bytes per request
Use the metric "apache_bytes_per_req" and get the average number of bytes present in each request served by the Apache server.
Apache bytes per second
"apache_bytes_per_sec" gives the average number of bytes per second served by the Apache server.
The metric "apache_uptime" gives the total amount of time the Apache server was up and running.
Apache busy workers
The number of workers serving requests received by the Apache server is monitored using the metric "apache_busy_worker".
Apache idle workers
With the metric "apace_idle_worker" get the number of idle workers available to serve requests recieved by the Apache server.
How it works?
- The plugin requires 'Curl' tool to fetch the statistics. Please ensure this tool is installed before using the plugin.
WordPress plugin installation:
- Create a directory with the name "wordpress", under the Site24x7 Linux Agent's plugin directory - /opt/site24x7/monagent/plugins/
- Download the file ""wordpress.sh" from our GitHub repository and place it under the "wordpress" directory
- Commands to perform the above step:
Configure Apache to support statistics:
- Edit your httpd.conf file so that it enables sending statistics. As mentioned at https://httpd.apache.org/docs/2.4/mod/mod_status.html#machinereadable
- Sample code for stats setup in the file "/usr/local/apache/conf/httpd.conf":
- Restart apache server and check wether the configured URL is receiving apache statistics by opening it in a browser
WordPress plugin configuration:
- Now change the following values in the plugin file (copied to agent plugin's directory earlier):
- Enter your stats URL as specified while configuring Apache for statistics to the variable "APACHE_STATUS_URL". The final stats URL should contain "?auto" in the end as this is required to fetch the statistics from our agent
Monitor additional metrics:
- To monitor additional metrics, edit the "wordpress.sh" file and add the new metrics that need monitoring
- Increment the plugin version value in the file "wordpress.sh" to view the newly added metrics ( For e.g., change the default plugin version from PLUGIN_VERSION = "1" to "PLUGIN_VERSION = "2")
- Redis plugin - Monitor performance metrics of your Redis databases
- PostGres plugin - Monitor performance metrics of your PostGreSQL databases
- Zookeeper plugin - Analyze performance of your Apache Zookeeper server
- Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
- Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
- Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes