Couple of months back, I started working for a client who had more than two million posts in his vBulletin forum. He had issues of very slow forum experience for users. I did a long list of to-do stuff to optimize vBulletin for better user experience as well as reduce the server load. A couple of months down the line he has no complaints from a user on forum speed now.
Let me share the same list in detail here. It not only will help optimize vBulletin on your own but will also help me in making the list of things to be done for optimizing large forums for future clients as well.
By Default vBulletin have Attachments / Images / Avatars all are stored into Database. You need to make sure you move them to files.
vBulletin by default renders the CSS as inline in the head part of HTML. It, in turn, increases the size of each page and eliminates the option for caching.
Storing the CSS as a file not only reduces the code from each page but also allows caching of the CSS file by browsers.
Apart from the editable CSS vBulletin also adds an extra CSS file clientscript/vbulletin_important.css. Copy the content of the file into your vBulletin CSS editor to make sure you have only one CSS file to save an additional server request.
You can even go one step forward and copy the content of the CSS file generated from your vBulletin interface and minimize CSS. Upload the file and use the CSS file instead of the CSS front end interface in vBulletin admin.
Note if you are using the CSS file, make sure your developers are aware of where to make the changes. Editing the CSS inside the admin will not work. Moreover, removing the CSS file from the “headinclude” template can mean it can impact the addition of editor CSS on a new thread and new post pages.
A lot of HTML can be avoided to render your pages much faster and reduce server load. Let me get into each of them one by one.
If you want to save on your bandwidth, you should have robots.txt file to restrict areas of forums you don’t have much for spiders.
User-agent: * Disallow: /admincp/ Disallow: /images/ Disallow: /modcp/ Disallow: /attachment.php Disallow: /search.php Disallow: /newreply.php Disallow: /newthread.php Disallow: /editpost.php Disallow: /profile.php Disallow: /register.php Disallow: /login.php Disallow: /subscription.php Disallow: /private.php Disallow: /report.php Disallow: /sendmessage.php Disallow: /memberlist.php Disallow: /misc.php Disallow: /moderator.php Disallow: /postings.php Disallow: /sendtofriend.php Disallow: /threadrate.php Disallow: /usercp.php Disallow: /showgroups.php
vBulletin provides compression for HTML output, but I prefer to get it done through Apache via mod_deflate. Disable Zipped output in vBulletin. vBulletin Options -> Cookies and HTTP Header Options -> GZIP HTML Output And add the following lines to your httpd.conf file in Apache.
<IfModule mod_deflate.c> | |
SetOutputFilter DEFLATE | |
# file-types indicated will not be compressed | |
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|rar|zip|pdf)$ no-gzip dont-vary | |
<IfModule mod_headers.c> | |
Header append Vary User-Agent | |
</IfModule> | |
</IfModule> |
Restart Apache webserver. Additionally, you should also use Apache to cache static content. Refer article by coderzone on How to Decrease Web Page Loading Time especially caching of static content.
I prefer CentOS on my server and vBulletin recommends APC for CentOS vBulletin combo. Refer an article by Floris about how to install APC on CentOS.
If you have MySQL 4.0.x, you can use this option to reduce server load significantly when a search query is used on your server. Admin CP > vBulletin Options > Search Type. Remember, the change itself is a server-heavy process as it needs to alter the vBulletin post and thread table. If you don’t have many searches avoid such a big query right at this moment.
I have not used vbOptimize Pro because it is untested on 3.7.x/3.6.x but had experienced a lot of good things about vbOptimize when it was a free mod at vbulletin.org
You can move static content like images, CSS, and JavaScript’s over to CDN and reduce your server load and speed up your vBulletin performance. See How to Integrate CDN With vBulletin
If you still have issues with your server ideally, you should hire me :D. Opt for MySQL post table partitioning. Partitioning your post table should be based on the threadid. Partition is introduced in MySQL version 5.1+, and you cannot use vBulletin’s FULLTEXT Search option on a partitioned table. Check out how to Partition MySQL table based on Range. Before you opt for partition, do read the Limitations.
Free Google Ads Tutorial for an absolute beginner covering campaigns and their types, networks, keywords,…
Do you want to make money programming in Java? Here are 6 creative ways for…
9 smart ways for freelancers to achieve financial freedom. First, you have to believe it…
With so many programming languages and resources available, it can be information overall to learn…
Wise review from an Indian freelancers point of view to receive payments in India. How…
There are 3 types of clients who want you to lower the price. How to…