Showing posts with label backend. Show all posts
Showing posts with label backend. Show all posts

Thursday, June 17, 2010

Accelerate drupal performance

Update: There are several modules available to Drupal 6 for caching pages, thus enhancing load-performance of your Drupal website.  I've personally tried the CacheRouter below, and have found this excellent article outlining an alternative - Boost & DB Maintenance.

Dedicated hosting setup
I just installed APC - the PHP opcode cache engine - on our server, and configured it as described in

APC Drupal Performance tuning

APC enabling & optimization makes Drupal websites SCREAM!

Shared hosting setup
If you are running your Drupal website on shared hosting, and don't have the option if APC ( as it is a server-wide installation, and not single-site!) then you might want to check out the Boost/DB Maintenance modules, or the one below...

CacheRouter Module
Update: I've tried this module on a website featuring AJAX loading of node content (through Views 2 Module), and experiencing rather high load-times with this combination.  Maybe Views 2 Cache needs to be enabled for the same content, maybe not.  I will test this later on - And please - if you test, then comment here... Thanks!

Sunday, June 6, 2010

Nodes - Hooking into them, loading and saving with new overridden values

Check out this code-centric article on using hook_nodeapi in Drupal 6.  There are good code-examples and the section "Caveats" is especially worthwhile.

Tuesday, June 1, 2010

Fast Install Drupal... DRUSH

DRUpal SHell (Drush) is without a doubt the fastest way of installing Drupal and other modules - the ones you ALWAYS use, the ones that you use for every Drupal installation...

Love thy terminal!
Drush is however a pure terminal (CLI) tool, and as such, you must (!!!) invoke and use it from the terminal... The most useful commands are:
  • "drush -h" - Get Drush help, see all of the things you can do through Drush!
  • "drush dl" - DownLoad (dl) Drupal in it's newest stable version
  • "drush dl [module] [module] [module]... [module]" - DownLoad the modules that you CRAVE!  This corresponds to downloading them from the Drupal Project's Website, and then FTP'ing them to the correct "/sites/all/modules" sub-directory of your Drupal installation
  • "drush en ...[module] [module] [module]... [module]" - Enable the modules that you just downloaded.  This corresponds to Enabling the modules through the Drupal Module Manager on your Drupal website
Install!
Installation of Drush is apparent from its project-page, but here is the specific procedure for Mac OS X - Also for those not quite comfortable with the Mac OS X Terminal Application.

Monday, May 24, 2010

Pretty URL's - Automatically

Pretty URL's in Drupal 6 are easily introduced at ANY TIME in your development cycle, using the Pathauto Module.

There is however ONE tiny fly in this ointment - In order to enable and use Pathauto, then you will have to introduce the Drupal Rewrite Rules into your web-hosts ".htaccess"-file, or directly into the Apache Directory Rewrite Rules for your website installation. ".htaccess"-files are the most commonly available option, on shared hosting anyway, and you then will just need to download the Drupal installer (if you don't already have this on-disk), and copy the very same ".htaccess"-file to the aforementioned location on your web-hosting.

NB! The Mac OS X Finder and Windows File Explorer (and their likes) may not show you the .htaccess-file, as it is a hidden file (prefixed with ".").
In these cases you will need to view your Drupal-downloaded installation (unzipped), directly in your FTP-application, and make sure that you are viewing all files, even the invisible or hidden ones.

The very last setting...
You need to make one very last setting in your Drupal installation; Visit the page at "/admin/settings/clean-urls" (being logged in as the admin-user), and make sure to enable Clean URLs!

Saturday, May 22, 2010

Developer modules

Just like you will need the essential modules, as the previous post outlines - then you, as the developer and designer of a Drupal website, will also benefit greatly from these...
  1. Devel Module+Devel Themer - Visualize content data, which template (theme) files that apply to a certain page or content-view, and use it to modify your pages and content!
  2. SimpleMenu* - Provide a general menu, always displayed at the top of your website - No need to reserve a block-position for this menu - it does it all!
  3. Zen-theme - A fasttrack to theming as you can literally "point-n-click" to create your own theme, and THEN specialize this theme to your liking
* SimpleMenu is great, but it has a conflict with the Devel Themer module (specifically the Themer module!), so use it with care, and when using for the admin-user you can switch Devel Themer on and off in your Modules Control Panel on your website.