Any reason why wp_cache_set not to work?

The wp_cache_*() functions are non-persistent caches which means that they only last during the current page request. This would be beneficial if you’re requesting the same information multiple times during page load. For example, if you’re showing recent posts in the header, content section, and sidebar ( calling the same code 3 times to retrieve … Read more

Refresh external feeds only in cron?

My recommendation would be to set up a wrapper for fetch_feed(). Call the wrapper function through WordPress’ cron and you shouldn’t have an issue. So something like: function schedule_fetch_feeds() { if ( ! wp_next_scheduled( ‘cron_fetch’ ) ) { wp_schedule_event( time(), ‘hourly’, ‘cron_fetch’, ‘http://blog1.url/feed’ ); wp_schedule_event( time(), ‘hourly’, ‘cron_fetch’, ‘http://blog2.url/feed’ ); } } function fetch_feed_on_cron( $url … Read more

Can we have a post without a slug?

I know this is really old question, but today I was dealing with something similar, and I have found a solution – if wp_unique_post_slug() calling is performance bottleneck, and post_name value is not important, then set post_name manualy to some random value. My wp_insert_post post action was taking too long lately (20-30s). It saves custom … Read more

Website is slow: advice on optimization

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 … Read more

Cache WordPress translations

I answered a similar question on Stack Overflow recently. Don’t forget that the profiler itself adds a big overhead. If your page loads are still really slow with XDebug disabled then I don’t think your problems are limited to translation files and you should look at caching entire pages. You can eliminate MO file loading … Read more

Fastest server stack configuration for WordPress?

There’s a post here that’s very good about load optimization and performance: Steps to Optimize WordPress in Regard to Server Load? It might be a good idea to also utilize a CDN for a majority of your page requests. If you want performance you’ll have to minimize requests to your database and setup aggressive caching. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)