Tips and Tricks: Configuration

How to quickly index large websites with Drupal?

The indexing of large websites can last days if not weeks with the Drupal standard settings. The decisive settings are "Run cron** every" and "Number of items to index per cron run". The standard settings are "3h" and "100 items" what means that 800 items can be indexed per day. If you build a site where the content isn't growing steadily from zero (Example: Dictionary) with thousands or ten thousands items, this will take weeks. This howto shows you how you can index a large site quickly.

Drupal module Ultimate Cron

301 redirects for your Drupal website (.htaccess file)

Very often you will need to apply a 301 redirect to your Drupal website. You can do so by adding the following codes to your .htaccess file in the Drupal root directory. If you don't redirect either "non-www to www" or "www to non-www" search engines such as Google consider your www and non-www website as "duplicated content", what might be penalised. Another important case is the redirection of an old domain to a new domain. The code below, redirects not only the root domain, but all paths/files, what is absolutely key in most cases.

How can I see my php settings?

Step-by-step instructions how to see the PHP values of your server using a phpinfo.php file. PHP has many environmental variables that you are able to update as needed. For example, you may need to update your php memory_limit to prevent certain scripts from running out of memory. In order to change these values, you must first be able to see what they are.

Use "Virtual Sites" to create subsites or virtual sites (multi-site feature)

If you want to create an additional website without the installation of an another instance of Drupal or if you want to create a subsite or virtual site without the complicated set-up of the multi-site feature, I recommend you the module "Virtual Sites". It allows you to set-up an additional site within very short time. All you need to do is to install the module, to add a new virtual site and to configure it.

Drupal module "Virtual Sites"

Disable account registration by anonymous users

If you don't need the functionality, that anonymous users can register accounts, I strongly recommend to disable it. This will save you the time to handle masses of unwanted requests.

Drupal Account Registration and Cancellation

How to automatically sort uploaded images and files in Drupal 7 (Multiupload)

By default, the multiupload imagefield and filefield don't sort the uploaded items by name. If you upload many images and files to your website, this can be a serious issue, since you have to sort the items manually. In Drupal 7, the issue can be resolved with a very simple change in the Multiupload Filefield Widgett (7.x).

Drupal Commerce Shipping by Weight

- Download the modules Physical Fields and Commerce Physical Product

https://www.drupal.org/project/physical
https://www.drupal.org/project/commerce_physical

- Download the patch file #27 & #13. Use a program to patch the files. The module file gets changed, and commerce_physical.rules.inc gets created. Please find the patched files for Commerce Physical Product 7.x-1.x-dev 2015-Sep-19 enclosed

- Upload, overwrite and clear all caches.

How to remove the users' blog link? OR How to transform the Blog module into a single user blog?

By default, the Drupal core Blog module is configured as a multiple user blog. This is very often not the desired solution, because the website should just contain a single user or a site wide blog, which isn't differentiated into different user blogs. Unfortunately Drupal core offers no possibilities to change that. Thus each blog entry comes along with a link to the username's blog, what is either not desired - because although multiple users are blogging the blog should appear as a site wide blog - or awkward - because it is always the same username.

Clean URLs not working? Check your .htaccess file!

Here are some of the most common reasons why your clean URLs may not be working (assuming you're using a normal Linux/Apache hosting environment).

1. Your site is in a subdirectory, or you're using an Alias, but you didn't set RewriteBase

2. Your .htaccess file didn't get uploaded at all

3. Your .htaccess file is corrupt

4. Pager and other query strings don't work

https://drupal.org/node/256410

Pages

Drupal themes to be compared