View Full Version : Is this recommended to do ?? how it helps ??
mariocaz
03-26-2009, 10:08 PM
Hi guys,
Please help me, I want to know if this step-tip is very useful and recomended to do it in the forum ??, and how it helps ???
* vB_Datastore_Filecache: You may use the file system to cache your Datastore and improve performance. To do this Open your config.php file in your includes folder and find:
// $config['Datastore']['class'] = 'vB_Datastore_Filecache';
and simply remove the two
//
to leave it like this
$config['Datastore']['class'] = 'vB_Datastore_Filecache';
to enable Filesystem caching of your datastore. Make sure that you have /includes/datastore/datastore_cache.php set to 777 so that it may write to the file.
I have a little fear to do it!!! what do u think ??, I am in a shared hosting, if this help?
Only I have to edit that part in the config.php and then change permission to 777 to that folder and that is all ???, but I don?t know what could happen if I do it ? and if its recommended to do it or not ?
I want to do it to optimize my forum, because I am having problems with my host because my forum is consuming a lot of resources in the server, so I am looking tips like this one to improve and optimize my forum at maximum, what else you could recommend me ?
Thank you so much in advance for all your awesome help in this!
Mario
ssslippy
03-27-2009, 12:18 AM
Filecache will reduce load on mysql and is worth doing.
mariocaz
03-27-2009, 01:01 AM
so it´s recommended ?? I am in a shared hosting.
veenuisthebest
03-27-2009, 01:56 AM
Even I am on a shared hosting, but my host has installed xcache for me. I hope you already have it, or maybe don't. Using xcache will have a better performance than filecache
$config['Datastore']['class'] = 'vB_Datastore_XCache';
ssslippy
03-27-2009, 02:06 AM
Cpanel comes with eaccelerator as an install and hosts do sometimes run this. If they enabled it you would be able to put your datastore there.
You can ask your host if they have any of these otherwise just enable file cache.
mariocaz
03-27-2009, 05:10 AM
Thank you guys,
Ok I will ask to my hosting to install XCache in the server and to enable it in my forum what I have to do ?
Dismounted
03-27-2009, 05:16 AM
To enable XCache datastore caching, just replace "Filecache" with "XCache".
mariocaz
03-27-2009, 05:22 AM
Perfect.
thanx
veenuisthebest
03-27-2009, 05:27 AM
Also if you enable xcache, do not forget to give a xcache datastore prefix in config.php, its quite important in shared environment atleast.
mariocaz
03-27-2009, 05:34 AM
hi vennuisthebest,
And how can I do that my friend ?
veenuisthebest
03-27-2009, 05:36 AM
You just need to open your eyes :)
// ****** DATASTORE CACHE CONFIGURATION *****
// Here you can configure different methods for caching datastore items.
// vB_Datastore_Filecache - to use includes/datastore/datastore_cache.php
// vB_Datastore_APC - to use APC
// vB_Datastore_XCache - to use XCache
// vB_Datastore_Memcached - to use a Memcache server, more configuration below
$config['Datastore']['class'] = 'vB_Datastore_XCache';
// ******** DATASTORE PREFIX ******
// If you are using a PHP Caching system (APC, XCache, eAccelerator) with more
// than one set of forums installed on your host, you *may* need to use a prefix
// so that they do not try to use the same variable within the cache.
// This works in a similar manner to the database table prefix.
$config['Datastore']['prefix'] = 'your_prefix';
mariocaz
03-27-2009, 05:42 AM
Ok yes I understand but only I have to put a name(prefix) there and that is all ??, really sorry if I am stupid.
mariocaz
03-28-2009, 07:22 PM
I asked to my hosting that please install for me in the server the XCache and they are checking this.
I hope they do it, to immediately enable the XCache option in the config.php
ssslippy
03-28-2009, 08:06 PM
If your host runs cpanel some hosts are reluctant to install xcache on a shared environment. Eaccelerator is not as good but it is supported by cpanel so hosts are more willing to install this.
mariocaz
03-28-2009, 08:39 PM
Yes I have Cpanel, so thank you for the tip and that is another option, and that options works with FileCache ?? or what ? please tell me.
Thanx ssslippy
Dismounted
03-29-2009, 03:40 AM
Filecache runs independent of installed services on the server.
mariocaz
03-29-2009, 05:16 AM
Ok Dismounted if my hosting enabled something else to the server like Xcache I will ask for your help to know what to do.
Also please tell me what else you can recommend me to optimize my forum to the maximum..... I already did all this tips:
Optimizing vBulletin for SEO and Server load will help your overall performance.
Here are a few tips I've found.
1. Store CSS StyleSheets as Files
By default, vBulletin will store the CSS of your pages as HTML within the head of the document. This, when taken over thousands of pages, can be quite a heavy burden.
Storing CSS Stylesheets as files will allow users/spiders to cache the CSS as a file, and make each page smaller, HTML wise, giving your server a bit of a breather.
To begin, ensure your forums/clientscript/vbulletin_css directory is chmod 777 so the stylesheet files can be created.
Next, in the AdminCP, select the vBulletin Options menu then vBulletin Options.
Select Style and Language Options.
Set "Store CSS Stylesheets as Files?" to Yes.
Click Submit.
2. Gzip those pesky pages!
Many hosts these days come with gzip as standard, meaning if you enable it within vBulletin you can actually slow pages down.
If your host has gzip installed, follow these instructions:
Go to the AdminCP, expand the vBulletin Options menu and select vBulletin Options.
Select Cookies and HTTP Header Options.
Set "GZIP HTML Output" to No, set "GZIP Compression Level" to 0 and click Submit.
If your host does not have gzip installed, choose Yes and 1 for the above.
3. Restrict Search Engine Crawling
Those spiders..they index your content, but there are always places that you don't want or need them to go.
To restrict the pesky critters to only eating up your Content, do the following.
In your root (public_html) directory, upload the following robots.txt::
User-agent: *
Disallow: /forums/ajax.php
Disallow: /forums/attachment.php
Disallow: /forums/calendar.php
Disallow: /forums/cron.php
Disallow: /forums/editpost.php
Disallow: /forums/global.php
Disallow: /forums/image.php
Disallow: /forums/inlinemod.php
Disallow: /forums/joinrequests.php
Disallow: /forums/login.php
Disallow: /forums/member.php
Disallow: /forums/memberlist.php
Disallow: /forums/misc.php
Disallow: /forums/moderator.php
Disallow: /forums/newattachment.php
Disallow: /forums/newreply.php
Disallow: /forums/newthread.php
Disallow: /forums/online.php
Disallow: /forums/poll.php
Disallow: /forums/postings.php
Disallow: /forums/printthread.php
Disallow: /forums/private.php
Disallow: /forums/profile.php
Disallow: /forums/register.php
Disallow: /forums/report.php
Disallow: /forums/reputation.php
Disallow: /forums/search.php
Disallow: /forums/sendmessage.php
Disallow: /forums/showgroups.php
Disallow: /forums/subscription.php
Disallow: /forums/threadrate.php
Disallow: /forums/usercp.php
Disallow: /forums/usernote.php
Remove any lines that you WANT the spiders to see.. if you want them to crawl the Calendar, take out Disallow: /forums/calendar.php.
4. Move Attachments to the File System
Stock vBulletin Attachments are stored in the Database. Large attachments or frequent viewing of them can cause a strain.
To move them to the File System, create an attachments directory above your public_html (at the same level as it.. /root/username/public_html | root/username/attachments) and CHMod it 777.
By placing it at this level, we prevent anyone from being able to access the attachments directly (ie: not through vBulletin).
Next, go to the AdminCP and expand the Attachments menu.
Click on Attachment Storage Type.
Move your attachments out of the database and into the file system.
Attachment Path: /home/*username*/attachments
5. Move Avatars and Profile Pics to the File System
As with the Attachments above, but the Avatars are on every post, so cause a burden to the server whenever a post is viewed.
To move them to the filesystem, chmod your forums/customavatars and forums/customprofilepics directories to 777.
Go to the AdminCP and expand the Avatars menu.
Click User Picture Storage Type.
Choose to Move Avatars and Profile Pics to the File System.
Avatar Path: /home/*username*/public_html/forums/customavatars
Avatar URL: /forums/customavatars
Profile Pic Path: /home/*username*/public_html/forums/customprofilepics
Profile Pic URL: /forums/customprofilepics
6. Increase Cached Posts Lifespan
Posts can be "cached", meaning the server doesn't have to pull them from the database every time they are viewed.
To enable Post Caching, do the following:
Go to the AdminCP, expand the vBulletin Options menu and select vBulletin Options.
Select Server Settings and Optimization Options in the drop down menu.
Set "Cached Posts Lifespan" to 90.
Click Submit.
If you have very little spare space, drop it to 30.
7. Disable Search and Who's Online for Guests
Why should guests (which are often mainly Spiders) see your Who's Online and Search? Do the following to stop them and reduce the load.
Go to your AdminCP.
Expand the Usergroups menu.
Select Usergroup Manager.
Select Unregistered / Not Logged In.
Set both "Can Search Forums" and "Can View Who's Online" to No.
Click Submit.
8. Turn on fulltext searching
Go to your AdminCP and expand the vBulletin Options menu
Select Search Type.
Set "Empty postindex and word tables?" to Yes.
Click Submit.
9. vBulletin.org Optimisation Mods
The following link willl provide the various Modifications that have been written by the Community at vB.org:
vB3.5 Add-ons - vBulletin.org Forum (https://vborg.vbsupport.ru/forumdisplay.php?f=113&threadprefix=Board+Optimization)
[Source.... (http://www.vbenhanced.com/forums/hints-tips/76-vbulletin-optimisation-tips.html#post222)] thx to Kall @ vbenhanced.com
And this is my forum: www.all-reefs.com
Thank you my friend!!
Mario
mariocaz
05-04-2009, 03:42 PM
Hi guys,
Finally I changed my hosting to a better option (Knownhost hosting) and I have now a VPS plan, so I think I could have XCache in my server.
I have a question right now I have enabled the FileCache option and when I did that, also I did this:
to enable Filesystem caching of your datastore. Make sure that you have /includes/datastore/datastore_cache.php set to 777 so that it may write to the file.
So now if I enable XCache I have to disable that ??? or I have to leave it like that ?
Please tell me and thank you in advance!!
Mario
Dismounted
05-05-2009, 05:40 AM
You must choose only one type of datastore caching.
mariocaz
05-05-2009, 03:28 PM
Hello Dismounted,
Ok also I want to ask you, I have a CubeCart only store in that server the XCache will affect the online store ?? do I have to put a prefix in the config.php for that ??
And finally do I have to change again the permissions in the folder ? /includes/datastore/datastore_cache.php
Thank you again my friend!!
<i>To begin, ensure your forums/clientscript/vbulletin_css directory is chmod 777 so the stylesheet files can be created.</i>
I hope you will NEVER do something like that... open wide your site to hackers.
And you wonder why people post that they got hacked by kiddie scripts that execute inside /tmp dirs...
Dismounted
05-06-2009, 06:48 AM
Ok also I want to ask you, I have a CubeCart only store in that server the XCache will affect the online store ?? do I have to put a prefix in the config.php for that ??
Just use a prefix anyway - its just good practise.
And finally do I have to change again the permissions in the folder ? /includes/datastore/datastore_cache.php
If you're using XCache, there is no need for any kind of folder permissions - that is only needed if you're using the File caching method.
mariocaz
05-06-2009, 02:37 PM
Thank you great Dismounted, perfect, I will put the prefix in the config.php file and finally do I change the permissions of the folder ? /includes/datastore/datastore_cache.php Right now is 777 but maybe for protection of my forum I have to change that again, if yes please tell me the correct permissions tu put again in that folder.
So this step is very insecure ?? , now I am very worried because TECK told me that. (thank you!)
1. Store CSS StyleSheets as Files
By default, vBulletin will store the CSS of your pages as HTML within the head of the document. This, when taken over thousands of pages, can be quite a heavy burden.
Storing CSS Stylesheets as files will allow users/spiders to cache the CSS as a file, and make each page smaller, HTML wise, giving your server a bit of a breather.
To begin, ensure your forums/clientscript/vbulletin_css directory is chmod 777 so the stylesheet files can be created.
Next, in the AdminCP, select the vBulletin Options menu then vBulletin Options.
Select Style and Language Options.
Set "Store CSS Stylesheets as Files?" to Yes.
Click Submit.
Because I did it and have the permission in that folder (/clientscript/vbulletin_css) to 777, so I have to change it urgently ?? and also go to my ACP and put NO in the Set "Store CSS Stylesheets as Files option.
Thank you again for all your awesome help.
Dismounted
05-07-2009, 06:46 AM
Directories should be 755, and files 644.
If the server is set up correctly, you can still use "Store CSS Stylesheets as Files".
mariocaz
05-07-2009, 06:15 PM
Thank you for all your Awesome help Dismounted!!!
I will tell today to my Hosting that please install XCache in the server.
One final question, do I have to do the changes in config.php before to the XCache is installed to prevent that my forum go down or I can do it after the XCache is installed in the server ?
Cheers!!
mariocaz
05-08-2009, 10:07 PM
Tahnk you so much Dismounted I have installed XCache and I see my forum with more speed.
I uninstalled the eAccelerator in the server becasue it was caused conflicts with XCache installed.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.