Drupal 7 Front-End Performance - Shared Hosting Recommendations
This post is more than 10 years old. I do not delete posts, because even old information is still useful, but please know that some material on this page may be outdated or incorrect. Thanks!

Here are my three recommendations for making your Drupal 7 website run great on a shared (or low-end VPS) host:
- Enable Boost. It's a life-saver. Boost caches your pages as plain ol' HTML files, so Apache can serve them up almost as quickly as people can request them. This will greatly improve your site's performance if you serve mostly anonymous users. If you care about stats, don't bother with the Statistics or Tracker module (they don't play nice with caching/Boost). Instead, use Google Analytics or another JS-based service. Or use your server's built-in apache log stats (most shared hosts provide AWStats or something similar).
- Enable all the performance options on the Configuration > Performance page. Specifically, check the boxes next to "Cache pages for anonymous users," "Cache blocks," "Compress cached pages," "Aggregate and compress CSS files," and "Aggregate JavaScript files."
- Add the rules below to your .htaccess file (if possible). The rules don't do a ton, but they'll improve front-end performance a little, if your hosting company allows .htaccess overrides (most do). If you use the mod_deflate rule, you don't necessarily need to check the "Compress cached pages" checkbox on the Performance settings page.
Rules to be added to the .htaccess file (I add this little block of code to the top of the file, just under the "Apache/PHP/Drupal settings:" comments):
##### Midwestern Mac-recommended additions #####
# Use mod_deflate to gzip components
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript application/javascript text/plain text/html text/xml application/xml
</IfModule>
# Disable ETags (can help if you're using multiple servers, or use cloud hosting)
# see: http_://www.askapache.com/htaccess/apache-speed-etags.html for more info
FileETag None
################################################
The last thing I'll mention is that you should definitely consider disabling any module that you're not actively using... and maybe even some that you are. If the module is not essential to your website's core purpose/functionality, consider whether it's more important for pages to load quickly, or for that module's functionality to be present. The less modules, the faster your site will go (and, often, the less cluttered it will be!).
Happy fast page-loading!
P.S. I'm working on a more authoritative Drupal Performance White Paper, on my personal website—I'll be compiling thoughts on performance and Drupal, from the perspective of a guy who maintains many Drupal sites, running on dedicated servers, VPSes, and the cheapest shared hosting available, with varying amounts of traffic/popularity. Check it out!
Comments