WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

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.

  • Image Files
    • Are there any unnecessary images? (e.g. Can you replace some of the images with text?)
    • Make sure all image files are optimized. Choose the correct format (JPG/PNG/GIF) for the type of image.
    • Smush.it and WP Smush.it plugin can also help.
  • Total File Number/Size
    • Can you reduce the number of files needed to display the average page on your site?
    • Combine multiple CSS files into a single, optimized file.
    • Minify CSS and JavaScript files.
    • If necessary, look into plugins to help this process (e.g. Head Cleaner and WP Minify).
  • Query Reduction/Optimization
    • Can static values be hardcoded into your themes? 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.
      • 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.

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.

Op Code Caching

WordPress is fast, but it contains a lot of code that needs to be loaded each and every time a page is shown. (And some plugins like bbPress contain a lot of additional code.)

In some envionments this load time can dominate performance times, adding several seconds per page. Op Code caching could help, but will not run in SuPhp shared hosting envrionments.

http://wordpress.org/support/topic/wordpress-slow-performance-shared-hosting?replies=1

Further Reading

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