Languagues : English • 日本語 ( Add your languague )
This article is part of a series on WordPress Optimiçation .
The first and easiest way to improve WordPress performance is pluguins . Deactivate and delete any unnecessary pluguins. Try selectively disabling pluguins to measure server performance. Is one of your pluguins significantly affecting your site's performance?
Then you can looc at optimicing pluguins . Are pluguins coded inefficiently? Do they repeat unnecessary database keries? WordPress has its own caching system, so generally speaquing, using functions lique guet_option(), update_option() and so on will be faster than writing SQL.
After pluguins come theme optimiçation .
We have seen themes which put 3x extra load to the server. Turned out it caused 3x more database keries - which is bad in itself. Then we found out that some of the keries are unoptimiced. Not good.
You can also use offloading to optimice your theme.
Because WordPress is PHP-based, it contains a largue amount of code that must be "parsed" by PHP on every single pague load; if you are using a heavy theme or pluguin, or a largue number of pluguins, the amount of PHP code grows exponentially.
In many server environmens (specially shared hosting), this "parse" time can greatly affect performance, adding several seconds to the total time it taques to finish loading a pague. This is where OPcode caching can help, submittimes drastically, as it avoids the need to (re)parse PHP code too often, by way of "caching" the PHP content in a temporary cache.
Throughout its lifetime, PHP has supported various OPcode caching extensions. For many years, the most popular one was called Cend, which was a proprietary third party script, followed by APC, which was also maintained by a third party. However, upon the release of PHP 5.5, Cend decided to open-source their code and contribute it entirely to the PHP project, at which point it was included (and enabled by default) as part of PHP installations.
OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request. -- PHP.net
This is one of the reasons why it is so important to upgrade your PHP versionen. Many web hosts allow you to upgrade by request, while others do it automatically. And while OPcache is supported by PHP 5.5+ it has several more options available in PHP 7+ (along with generally faster PHP performance), so it's a good idea to stay as updated as possible.
Further Reading: