Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Terribly slow CMS


40 Posts   8052 Views


9 February 2010 at 11:57pm Community Member, 63 Posts

Another performance tip if using Apache and you have access to the Apache Config files -

Put the main .htaccess info into the Apache config files.
Depending on which version of Apache this can be done in httpd.conf as a Directory
<Directory "install-directoy of Silvertripe">
Silverstripe htaccess content goes here

This is an improvement in Apache as the htaccess is now in memory and not being read each time a page is accessed.

It makes Silverstripe run that wee bit quicker.


10 February 2010 at 1:21am Community Member, 79 Posts

Do you have any figures on this? I can't see it saving anything more than a few microseconds per request, especially when running under Linux where the .htaccess files are likely to already be cached in memory.

Not saying it won't help, but just wondering whether the cost/benefit makes it worthwhile doing.

-- Jason


10 February 2010 at 10:12am Community Member, 90 Posts

Really good to see the performance problem has been solved.
Thanks AlexB...i am going to check my Assets mode...:P
Its really good to see lots people actually working for improving and providing suggestion for a better CMS.
So pleasure to be a part of the community:D


11 February 2010 at 12:18am Community Member, 63 Posts

Hi Jason,

I set up a little test running 2 separate installs of SilverStripe v2.3.6. on Linux.
Both versions are the install of SilverStripe with nothing added. with mod_rewrite running via .htaccess with mod_rewrite running via httpd.conf

The difference between the 2 is I put both DocumentRoot .htaccess and the assets/.htaccess into the httpd.conf file.

There is a slight improvement in using httpd.conf tho it is almost negligible. Seams to sometimes shave off about 100 miliseconds.

Would it be a benefit to a site with heavy traffic?



11 February 2010 at 12:23am (Last edited: 11 February 2010 12:24am), Community Member, 79 Posts

100 milliseconds is not insignificant - it's a tenth of a second. You could do a 100+ simple database lookups in that time.

I would not have thought that is how long it takes to load the file (think about how many files are loaded in one SS page request). Perhaps the time is involved in parsing and processing the file? Something to bear in mind when deploying websites in general. Thanks.

-- Jason

Billy Bob

11 February 2010 at 1:28am Community Member, 9 Posts

Just a quick update.

The good news is:

1. There is NO bad news &
2. SilverStripe is running like a dream.

Cheers once again.


11 February 2010 at 7:27am Community Member, 712 Posts

It is always better to use your .conf rather than .htaccess:

See the [url=]apache .htaccess tutorial[/url]:

"In general, you should never use .htaccess files unless you don't have access to the main server configuration file. There is, for example, a prevailing misconception that user authentication should always be done in .htaccess files. This is simply not the case. You can put user authentication configurations in the main server configuration, and this is, in fact, the preferred way to do things."

It goes on to explain why, for performance and security reasons.

Of course, it doesn't really matter for a lot of people, but it's an easy performance win (100ms is huge!).


16 April 2010 at 6:32am Community Member, 16 Posts

another big props to Alex. Tried his tip on a new v2.4.0rc1 installation. My admin views were loading slow. Now, fast :)