How Do I Increase Forum Site Speed?

Kenneth Holland

Active member
Hi All,

I am very close to launching my XF-powered forum but I'd like to get some input on increasing page load speed.

The root of my site is Wordpress and uses W3 Total Cache and is pretty fast. The forum is in a subdirectory. I'd like to get some input from the community here and what I could implement to improve performance...ie page caching, etc...

Any help would be appreciated. :)

Ken
 
Turn off developer mod

---- If you have it on it uses resources even when no one is on the site.

Turn off guest searching

---- Spam bots, cyber bots, and other little evil things will abuse search and eat your site alive. Have a few 500 people refresh the search page and you have a successful DDOS tactic.

Remove the members list

---- 50% (or more) speed boost by doing this
---- Reduce spam threat as well

http://xenforo.com/community/resources/remove-members-list.1036/
 
Remove Sidebar Share Page

This is a simple way to increase your front page load time. Simply open the template sidebar_share_page and delete its content. Any time you would like to re-add this to the sidebar, simply revert the template.

By doing this you will minimize DNS look up on the front page. This will not affect all the many share buttons you may have on your forums, threads, or other places. So don't worry.

xenforo.com 2012-10-2 2:11:43.webp
 
Test your site on https://developers.google.com/speed/pagespeed/insights and follow the advices. You should easily reach a score of 90+

OK, so it says 87 - with the biggest problem being the lack of compression of the .js files.

But that's the jquery files as well as some add-on files - tapatalk, gritter, etc. - they show as being on my server.

So, is there a XF setting I should check? Or is this in apache setup?
 
If you have Cpanel then login to your control panel, click on "Optimize Website" and choose "Compress all content".
No cpanel....

I will fiddle with apache conf - after I carefully check what is set now. I suspect my html and php is already being compressed - just not my js
 
If the needed Apache module mod_deflate is installed you can enable this in your .htaccess for any files you want e.g.


Code:
<IfModule mod_deflate.c>
<FilesMatch ".*\.(html|php|css|js|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
AddOutputFilterByType DEFLATE application/javascript application/x-javascript
</IfModule>

For details see http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
 
Great - that seems to have done the job according to some reports (pagespeed still says it is not compressed, but other utilities say it is - maybe pagespeed has cache).

Or, maybe because those .js files are served from elsewhere (goog, etc.)?...they are uncompressed by the time they show up on my page?
 
Hi Adam,

Do you where I can find APC with File Cache?
I mean use them together.

Install php5-APC and have it run in the background. That will help with some php performance.

If you're on a shared host, that installing APC is not possible.... But File Cache is indeed possible and usable.

PHP:
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] ['cache_dir'] = 'PATH TO CACHE FOLDER - CAN BE NAMED ANY THING';
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] ['cache_id_prefix'] = 'YOU PREFIX HERE';

You may need the full server path for file cache
 
I mean use them together.

Install php5-APC and have it run in the background. That will help with some php performance.

If you're on a shared host, that installing APC is not possible.... But File Cache is indeed possible and usable.

PHP:
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] ['cache_dir'] = 'PATH TO CACHE FOLDER - CAN BE NAMED ANY THING';
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] ['cache_id_prefix'] = 'YOU PREFIX HERE';

You may need the full server path for file cache

Will APC work on a VPS?
 
Will APC work on a VPS?
Yes, VPS or Dedicated. :)

Simply install it and it will do it's thing.

Assuming you have Debian or Ubuntu

PHP:
aptitude update
PHP:
aptitude install php5-apc
PHP:
/etc/init.d/apache2 restart

If you're not using a control panel. Now is also a good time to make sure everything is updated


PHP:
aptitude update
PHP:
aptitude full-upgrade
 
Back
Top Bottom