3

I have got some problems with performance, exactly page speed load on my Website.

Here are things listed below: I have got WordPress installed on my VPS with Nginx platform.

AMD 8 cpu's 
2x SSD 250GB
32GB memory

WordPress is updated.

Installed Plug-ins list:

- Akismet
- BWP Minify
- Disqus Conditional Load
- Google XML Sitemaps
- iThemes Security
- W3 Total Cache
- WordFence
- WP Missed Schedule
- WP No Category Base - WPML Compatible

WordPress has about ~ 46.000 published posts over years and for about ~ 11.000 user published comments (SPAM about ~ 1.000 blocked by Akismet) integrated within Disqus commets.

Server load is under 2.00 and memory usage about max. ~ 30% (it is ok).

It is not that much, server is super, but the problem could be with a lot posts and comments or plug-ins or ads?

W3 Total cache uses APC. Code is minified itself (HTML, php, css, js) without W3 Minify.
BWP minify modified so it has "async" atributte while loading few .js files (around 10) combined into one (css files about 2 are alsoc comined into one).
Wordfence modified, so it does not scan every day, live traffic disabled.
Nginx directives for location / and files under location are modified - added headers, gzip, security, etc.

Theme is modified and optimized, so it does not contain other plugins like sliders and so on, wp_head things cleaned, etc.

There is no WordPress menus crated - all HTML (was slow query, so we rather done it with HTML).

Also, there is one bigger problem I think, the Website have 6-7 blocks reserved to display advertisements:

Google AdSense, 728x90, 970x250, 300x250, responsive

If I remove the ads, the thing goes much faster. But the ads are for marketing purposes where we can earn something.

Daily visists about ~ 10.000 (based on Google Analytics).

I m searching over the Internet for things, Github, Stackoverflow and official websites like Nginx, WordPress (inc. forums).

I am woundering what do You think, have You got any performance tips, ideas and other usefull stuff like links, etc. that could help me to get that working?

I would be very thankfull for any information shared!

Thanks a lot!

8
  • Maybe some CDN? Commented Apr 13, 2016 at 13:27
  • Also Admin Dashboard seems going slower :S Commented Apr 13, 2016 at 13:27
  • 1
    If you are serious about it, you will need to hire someone to look at your code and settings. It is possible you are just out of server resources, especialy memory Commented Apr 13, 2016 at 14:28
  • 1
    btw if you had to write the menu in html then it is likely your object cache do not work Commented Apr 13, 2016 at 14:29
  • 1
    with object caching and I assume page caching as well, you really should not need to do such crud things. Something in your setup is wrong Commented Apr 13, 2016 at 16:12

1 Answer 1

7

I work with several large WordPress sites, news sites specifically, that have thousands of posts and thousands of visitors (300k/day). With the stuff below, and a well coded theme, with well written queries, we're loading in 2.5s with 7 ad blocks from AdSense and RevContent.

  1. Do you have a CDN? I highly recommend a CDN if you don't have one. Depending on your budget, you could go free with CloudFlare (if you're just running AdSense and no DFP, you can turn on RocketLoader, which will increase speed), or you could use a premium service like MaxCDN (what I use) or Amazon Cloudfront (I have used).
  2. I really prefer not to use minifying plugins and prefer to minify and concatenate all CSS and JS manually. The reason being is that I get rid of another plugin, which can speed up the site, and I don't put any strain at all on site having to minify the files. I use CSSMinifier.com and JavaScript-Minifier.com and I generally create a top.js and bottom.js file.
  3. To load JS files via async, you can use the following function, which is fantastic. All you have to do is add the JS files, like I listed below, with the file name and it'll add async. Note that this only works for files load via wp_enqueue_script.

    function js_optimization($tag) {
      $asyncscripts = array('jquery.js', 'jquery-migrate.min.js');
      if(!empty($asyncscripts)) {
        foreach($asyncscripts as $asyncscript)) {
          if(true == @strpos($tag, $asyncscript)) {
            return str_replace(' src', ' async="async" src', $tag);
          }
          return $tag;
        }
     }
    add_filter('script_loader_tag', 'js_optimizer');
    
  4. Run your site through GTMetrix.com. It gives you PageSpeed and YSlow scores, with suggestions on how to speed up the site.

  5. The plugin BJ Lazy Load is great for speeding up the loading of the front end.

3
  • Thank You a lot for detailed explanation and shared tips & trick! Commented Apr 13, 2016 at 16:02
  • Please add your code inside your question. Do not use third party services to host code Commented Apr 13, 2016 at 16:27
  • Sorry Pieter. Originally the code tags weren't working for me for some reason. They worked this time though, so I updated it. Commented Apr 13, 2016 at 18:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.