Tag Info

Hot answers tagged

36

Yep, this is nasty issue that to have full WordPress environment you need to spend considerable time loading it. I've needed much better performance (for very dynamic incremental search feature) for work and what I went with is: Custom file as Ajax handler. SHORTINIT constant for limited WP core load. Very selectively loaded parts of core, only those ...


35

No it doesn't. At least, not on the front end, or in the back end in any non-plugin area. WordPress only loads files whose filepaths are stored in the active_plugins option in the database and ignores everything else completely.


29

Hi @googletorp: Clearly nothing scales as well as static files served by a fast web server and any CMS that has to figure out what to load and then load it will not perform as well, WordPress or otherwise. One of the issues is the number of database queries required per URL request and my 2 prior years experience working exclusively with Drupal and now 2+ ...


23

You could install WordPress on Nginx. There are a number of resources to help: nginx Compatibility plugin HOWTO: Install WordPress On Nginx- Slicehost discussion How To Speed Up WordPress With Nginx And WP Super Cache WordPress on nginx + lighttpd + FastCGI + php Nginx as a front-end proxy cache for WordPress Some performance information from that last ...


22

Set client-side expiries for things like css, images, JavaScript etc which don't need to be redownloaded for each page view. This, by far, made the biggest difference to my site loading times. The fastest download is the download that never happened ... # BEGIN Expire headers <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus ...


21

On shared hosting plans your caching options are limited. You will only be able to statically cache the html output from your pages. This is the fastest way to serve pages but you loose the dynamic aspects of WordPress like making comments and seeing the latest comments on posts. There are disk caching options available for objects and database but unless ...


18

Minimize the number of plugins you run to only what you really need. Especially be aware of plugins that add javascript and CSS code on every page load, even when that code isn't being used on the page. If you are creating your own theme from scratch, break your CSS down so that features that are only need for particular page templates or view types ...


16

My WordPress Performance and Caching Stack This is the best WordPress performance stack for a low to mid range single server or VPS. I am classifying mid range as single core with around 1G of memory and fairly fast drives. Server Stack Linux - Either Debian Lenny or Ubuntu Nginx - Configured as reverse proxy static file cache Apache - Apache will ...


13

Except in unusual cases having deactivated plugins only affects the performance of the plugin page in the admin, and only then a trivial amount (unless you have hundreds of plugins.) During the plugin admin page load WordPress scans all the plugins and then stores the list of active plugins in the database. Then on all other page loads WordPress inspects ...


11

Assuming all the installs are on the same instance and thus can have the same files shared between them, then the main thing you need to do is to have all the custom content stuff live outside of the main WordPress folders. So first, you're going to want a fresh copy of WordPress somewhere, untouched (and untouchable, the whole point is to have a single ...


10

Run memcached and use an object cache to reduce the number of database queries. This caches data from the database, rather than pages. Not sure if w3-total-cache already does this. Make sure you are running an opcode cache like APC. (There are several more available.)


8

You can check by looking at the size of the rewrite_rules option in the database. If it's small (which I believe it should with this structure), you're not using verbose rules. By contrast, if you see several lines per static page, you're using verbose rules and it's not good.


8

You should be forewarned that not all plugins/themes use enqueue. When I first started dealing with all the JavaScripts and CSS files outputed I just hooked into the enqueued files. This resulted in me only getting 2 out of 10 JavaScript files and 1 out of 3 CSS files. Here is some quick PoCs. Neither tested but meant to put you in the right direction, if ...


8

The size of the table isn't really the issue, the queries you're running on that table might be. For example, if you're selecting users based on data stored in the user-meta table, then that query will be highly unoptimized, because meta_value is not an indexed field. In which case you may need to add extra indexes or consider storing that particular data ...


7

In addition to using a disk caching plugin like wp-cache, put your blog on a host volume that has the "noatime" property set on it. Otherwise, SSH into your host (if your webhost provides that) and routinely run this command on your files every few days: chattr -R +A ~/* The ~/* means "my files under my home directory". You can change that path as you ...


7

A few answers off the top of my head: 1) Minimize the number of HTTP requests the browser has to make to your host by concatenating JavaScript and CSS where possible/practical. 2) Offload as much of your image/media serving to 3rd party CDNs as possible, particularly if you're using shared hosting. 3) Try reducing the number of posts you're displaying on ...


7

@Tal, Generally speaking you should only be using one caching plugin. WP Super Cache, W3 Total Cache, Hyper Cache and DB Cache Reloaded all drop files directly in your wp-content directory and they would conflict with each other and cause errors if you were using more than one. I would recommend using W3 Total Cache because it gives you the option of ...


7

Styles and scripts are always set up by the functions wp_enqueue_script() and wp_enqueue_style(), which have to be tied to a particular action hook in order to function. I took a peek inside Contact Form 7, and it looks like it's using action tags of wpcf7_enqueue_scripts and wpcf7_enqueue_styles to add them to the wp_print_scripts and wp_print_styles ...


6

Profiling with Profiler-Plugins Not sure exactly what you need to accomplish with your profiling, but WP Tuner (Wordpress Plugin) goes a long way to finding what is slowing down your WP install. It looks at each plugin and give your the memory, CPU time and SQL queries involved. The SQL Monitor (Wordpress Plugin) analyzes SQL performance. Combine it with ...


6

I could be wrong, but I don't think your queries are the problem here. Seeing the result "36 queries in 8.291 seconds" is scary, but that only measures the time in between the start of the first query and the completion of the last query. There are a lot of other things in there slowing your page loads down. If you want to see how much time your queries are ...


6

You're not going to get a noticeable difference doing it one way over another. Slowness comes from what the code is doing. If you're worried about performance, just make sure you're caching external requests whenever you can, that includes calls to the database.


6

You can meassure Plugin performance with the P3 Plugin pretty well. It will show you, which one of your plugins is the one that takes the most time and costs you the most resources.


6

If possible get your PHP updated to the 5.4.x branch. Before you add your caching layer you need to determine whats slowing down MySql and PHP. You need to enable WP_Debug and eliminate any PHP errors. Look for undefined indexes, syntax errors and deprecated functions. That 20 second to first byte is all PHP, MySql and or WordPress related. It sounds ...


6

As cool as infinite scalability would be, it is not really necessary to code into most projects. That limit of 100000000000000 is high enough that you could run a single WordPress Network for all the inhabitants dyson ring 1000 km wide at Earth's orbit with current population density to still have 7 accounts each. Or in another way thats about 15000 posts ...


6

If INT is set to UNSIGNED, allowing only non-negative integers, your value range is from 0 to 4294967295. Thats... 4,294,967,295 (4 billion +). ...for the given table. Just to put things into perspective. Only through poor management and unnecessary incrementation would you exhaust that range, say for your posts table as an example. That said if you ...


5

This is nonsense. Almost all URL getters are a result of get_option(), eg. get_option('stylesheet_root'), get_option('template') and so on. These options are loaded very early during the request, they are cached and not fetched again. Since the options are fetched anyway, all you can improve is processing time. Nanoseconds. This isn’t worth the trouble. ...


5

Caching the WordPress Menu also gives you a performance boost. Especially if you have a lot of Pages or a giant Menu Structure, this should be considered. Do it in 2 easy steps. At first, create a function that gets or creates the menu, instead of calling wp_nav_menu directly. function get_cached_menu( $menuargs ) { if ( !isset( $menuargs['menu'] ) ) ...


5

Filter option_active_plugins. You can change the result of get_option() here without actually changing the database. if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) add_filter( 'option_active_plugins', 'disable_plugins_temporary' ); function disable_plugins_temporary( $plugins ) { // unset plugins you don't need, then return $plugins; } ...


5

This type of question is open ended to answer because it depends on many variables. The typical memory usage of bare WP usually starts at 15MB and scales up. What you can do is turn on debugging and install the Debug Bar plugin and it will show you the amount of memory you're using. In wp-config.php set define( 'WP_DEBUG', true ); Another plugin which ...


5

Souljacker, I would first take a look at your plugins. Star Ratings for Reviews hasn't been updated for over 3 years and looks like its real heavy on the db. I saw some raw sql with some INNER JOINS that look troublesome. On the server side you should implement some object caching. APC is the defacto standard and will give you the best results. Once ...



Only top voted, non community-wiki answers of a minimum length are eligible