wp_posts query slowing down my website

Although a quarter of second is quite slow to query a single post from db, I’m convinced that this is not your only issue. I also use the Query Monitor plugin, but I have never really taken note when does the plugin redline a query as being slow. But that is not the point here. … Read more

How to remove /page/2/ from home page?

If the front page is set to display posts then the query for those posts will run regardless of wether your theme shows these posts or not. That’s why you’re getting pagination with no posts. You can test this by temporarily removing your themes front-page.php (or whatever it is). You should see all your posts … Read more

Why does Thickbox jQuery load on my site?

You are perfectly right, ThickBox is old and it supposes to be present in admin Dashboard only, but beeing able to change this kind of behavior makes WordPress great (and sometimes not). Every theme or plugin can actually call this library for his help with the wp_enqueue_script(‘thickbox’) function or it can use it as a … Read more

Profile / benchmark wordpress on apache?

It is impossible to just guess what the performance issue is, it might not be related to a web server at all. Your options with WordPress are (scope ascending): PHP runtime profiler / debug code for basic timing of WP load. PHP engine profiler (binary extension), such as Blackfire. Full stack profiler (server software, etc), … Read more

Calling various CSS sheets in header a good idea?

Instead of directly outputting the stylesheets to your header, you should use wp_enqueue_stylesheet. Take a look at this example: add_action( ‘wp_enqueue_scripts’, ‘my_scripts’ ); function my_scripts(){ if (is_page([505,981,928,1035,1036])) wp_enqueue_style( ‘css1′, get_template_directory_uri().’/start-here.css’); if (is_page([37,40])) wp_enqueue_style( ‘css2′, get_template_directory_uri().’/faq-links.css.css’); if (is_page(’27’)) wp_enqueue_style( ‘css3′, get_template_directory_uri().’/contact-form.css’); if (is_front_page()) wp_enqueue_style( ‘css4′, get_template_directory_uri().’/slider.css’); } This way, you don’t have to mess with your … Read more

High load average, low CPU usage – why?

With some further investigation, it appears that the performance problem is mostly due to a high number of network calls between two systems (Oracle SSXA and UCM). The calls are quick but plenty and serialized, hence the low CPU usage (mostly waiting for I/O), the high load average (many calls waiting to be processed) and … Read more

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