Codex

WordPress Optimization/WordPress Performance

This article is part of a series on WordPress Optimization.

Plugins

The first and easiest way to improve WordPress performance is plugins. Deactivate and delete any unnecessary plugins. Try selectively disabling plugins to measure server performance. Is one of your plugins significantly affecting your site's performance?

Then you can look at optimizing plugins. Are plugins coded inefficiently? Do they repeat unnecessary database queries? WordPress has its own caching system, so generally speaking, using functions like get_option(), update_option() and so on will be faster than writing SQL.

Themes

After plugins come theme optimization. Does your theme use unnecessary graphics? Does it use graphics where text would do just as well? Look at how many files are required for the average page on your site and look for ways to reduce this. For example, combine multiple CSS files into a single, optimized file. Search for topics like css optimization and javascript optimization for more info on this.

Can static values be hardcoded into your themes? For example, your site charset, site title, and so on. Can you hardcode menus that rarely change? Avoiding functions like wp_list_pages() for example. This will mean you have to edit code every time you make changes, but for generally static areas, this can be a good trade off.

We have seen themes which put 3x extra load to the server. Turned out it caused 3x more database queries - which is bad in itself. Then we found out that some of the queries are unoptimized. Not good.

You can also use offloading to optimize your theme.

This page is marked as incomplete. You can help Codex by expanding it.