FeaturesWP CloudPricingEE CLIContactMy Account
Features
Team Access & User Permissions
Install
Resources
Community
CLEAR
Tutorials
WordPress
Performance Optimization
Topics
On this page
-
- Getting Started
- Git and File-System Layout (non-default setup)
- Version Constraints
- Managing Themes and Plugins (for entire WordPress site)
- Updating Themes and Plugins (for entire WordPress site)
- Adding Composer Support to Your Own Themes and Plugins (for developers)
- Using Composer to Manage Own Theme/Plugin Dependencies (for developers)
-
- Assigning Multiple IP Addresses to Single LAN Card
- Disable IPv6 on Ubuntu 12.04
- dsh – distributed shell
- fdupes – find & replace duplicate files with hardlinks
- GPG Keys Cheatsheet
- Increase "Open Files Limit"
- kill all php, nginx, mysql or any kind of processes
- Passwordless Authentication for SSH
- Screen
- search replace in multiple files useing grep xargs sed
- Setup sftp
- sysctl.conf
- Timezone Sync
- Using Google Public DNS on Ubuntu Server
- Using openssl to match private key, cerificate and CSR
- Configure Postfix to Use Gmail SMTP on Ubuntu
- Logrotate Example for Custom Logs
- PHP 5.5, MySQL, Postfix, Nginx and WordPress on Ubuntu
- Serverdensity
- Upgrade Ubuntu 10.04 to 12.04
- Using find and sed to replace strings in multiple files
- Webmin
-
- .my.cnf – mysql user & password
- Analyse slow-query-log using Anemometer
- Improving MySQL Query Cache
- MySQL Query Profiling
- Reset MySQL root password
- tuning-primer.sh – an alternative for mysqltuner
- Using MariaDB 10
- Install/Upgrade to MySQL 5.6 on Ubuntu 12.04 LTS
- Change WordPress Domain Name
- Character Sets and Collations
- Enable innodb_file_per_table
- Enable Remote Access (Grant)
- Installing Percona Toolkit
- Using tmpfs for temporary folder creation
- YARPP and InnoDB
- Convert MyISAM to InnoDB
- Using tmpfs for mysqldump & mysqlimport
- Convert from INNODB to MYISAM
- Analyse slow-query-log using mysqldumpslow & pt-query-digest
- mysqlcheck with cron to optimize automatically
- Using MySQLTuner to Optimize MySQL configuration
-
-
- Directly connect to PHP-FPM
- Generating core-dump for php5-fpm
- GeoIP
- Having php5 and php7 on same system.
- Install Xdebug and configure it with webgrind
- Installation of PHP Code Review Tools
- memcache
- PHP's Zend Opcache Config & Web Viewer
- Setting Sqlite support with PHP
- Using HHVM with PHP-FPM Fallback
- Using Redis for PHP Sessions on Ubuntu Server
- Installing PhpMyAdmin Quickly
- Moving PHP's session storage to tmpfs
- Install Xdebug and configure it with Netbeans
- Nginx – Enable PHP-FPM Status Page
- PHP-FPM: Socket vs TCP/IP and sysctl tweaking
- APC Cache Optimization & Monitoring Using Web Interface
- Checking if PHP/WordPress can send mails
- Debugging PHP Scripts Using slow_log and more
- Increase file upload size limit in PHP-Nginx
- Increase PHP script execution time with Nginx
-
- Performance Optimization
- Remove Query string of css/js files
- Setup ElasticSearch with ElasticPress
- Using Redis for WordPress Object-Cache
- WooCommerce Window Shopping Caching Technique
- Moving WordPress To New Server (Faster)
- Better wp-cron using linux's crontab
- 404 error- Page not Found!!!
- Debugging WordPress with Nginx
Web Server
Checklist
Tools
PHP
Checklist
MySQL
Checklist
Web Hosting
Notes
Performance Optimization
TL;DR; Use EasyEngine. It handles most of this out of the box and provide easy commands for remaining stuff.
For a WordPress site, there are many areas where performance can be improved.
A typical WordPress site setup consists of:
- Web Server e.g. Nginx, Apache, IIS
- PHP interpreter e.g. CGI, FastCGI, PHP-FPM, HHVM
- MySQL e.g. oracle-mysql, percona-mysql, mariadb
Some sites uses an accelerator like Varnish in front of web-server. Varnish could be fine for Apache, but don’t recommend using Varnish with Nginx.
In terms of audience, we need to optimize site for 2 types of users:
- Non-logged in users
- Logged in users (including admin users)
Non-logged in users can benefit a lot from web-server tweaking alone.
For logged in users, you need to focus on PHP and MySQL.
Web Server
Checklist
- Use Nginx as your web-server. If you are new to Nginx, try EasyEngine. EasyEngine makes managing WordPress sites easy with Nginx web-server.
- Use CDN for static assets e.g. images, css and JS files
- Combine CSS and JS files and if possible minify them. Try doing this via pagespeed. If that is not possible, use W3 Total Cache for this. Be very careful with this step as it can break your themes and plugins.
- Optimize image sizes with lossless image compression. You can do this either using pagespeed or a WordPress plugin like smush.it.
- Protect wp-login.php from bruteforce attack at nginx (web-server) level. A strong password can save you from getting hacked, but bruteforce login attacks create unnecessary PHP-MySQL load.
- If you are using SSL, use it for complete site. Avoid using SSL for parts of your site. SSL can be tweaked as well.
Tools
You can use gtmetrix.com and/or webpagetest.org.
Try to score as many “A” as possible.
More: Check Nginx tutorials section
PHP
Checklist
- We recommend using nginx with HHVM with PHP-FPM fallback.
- If HHVM doesn’t work with your plugins and themes, then Nginx with PHP-FPM is best.
- When it comes to PHP, always use latest PHP version, even though WordPress supports outdated PHP versions (which exposes WordPress sites to security risks)
- Always use Zend Opcache for opcode caching.
- Move session storage to tmpfs or memcache
- Use memcache for object-cache. You can do it using W3 Total Cache plugin.
- Analyze PHP code performance using xdebug and webgrind.
If you find checklist long, try last one only.
Many WordPress plugins are coded by amateurs and if you are unlucky, you will be using a poor coded plugin. Xdebug profiling can help you find it.
If you are using EasyEngine, you will get most of above out of the box.
For xdebug profiling, you can run command:
ee debug example.com --php
More: Check PHP tutorials section
MySQL
Checklist
- Use latest MySQL version. Though WordPress will work with older version, new mysql versions has better performance.
- Periodically tweak mysql configuration, using scripts like tuning-primer and mysqltuner
- Enable slow query log and analyze it with anemometer. This is highly recommended if you are seeing site slowed down for non-logged in users.
- Profile mysql query to check internal execution.
- Convert MyISAM tables to InnoDB tables. If you have plugins which relies on custom post type, this is must.
- Use tmpfs for mysql temporary tables.
- Add mysql indexes if possible to speed up queries. Many plugin developers don’t take efforts to add proper mysql indexes for MySQL tables there plugin creates.
More: Check MySQL tutorials section
Web Hosting
Never use shared hosting. If your site is small, you won’t be reading this article. As you are reading this, it means your site is big and need to tweaked. Most of stuff here won’t work on shared hosting.
WordPress specific hostings e.g. WP-Engine makes few things easier but they won’t give you full control.
We recommend VPS with SSD hosting. DigitalOcean and Linode are our favorites!
Notes
Of course, after all of above, your site may still be slow. Chances are high that you missed something from above list.
Unfortunately it’s not possible to solve performance problem for any site over our community support forum or skype/email exchanges. rtCamp can only help if it gets first-hand access to the server! You may contact us if for professional support in that case.
Links: EasyEngine
Remove Query string of css/js files
NEXT
Features
- Server Setup & Management
- Site Creation & Management
- Create WP Cloud Sites
- Speed & Caching
- Firewall Protection
- Backups & Recovery
- Logs & Monitoring
- Deployments & Developer Tools
- Team Access & User Permissions
Useful Links
Product
Other Products
Subscribe for curated product updates, tips, and announcements.
"*" indicates required fields
Company
This field is for validation purposes and should be left unchanged.
Email*
SIGN ME UP
Δ
© rtCamp, since 2009. All rights reserved.