Drupal 7 Running Slowly on WAMP

Drupal 7 Running Slowly on WAMP 7 min read

For those of you developers who use WAMP for local development, you’ll want to follow these tricks to speed up the time it takes to load pages on your development site.


1.) Update your mysql my.ini file

This little trick will give you some additional speed when trying to perform those heavy database queries. Simply navigate to your /wamp/bin/mysql/mysql5.5.24 folder (or wherever you installed WAMP) then locate the my.ini file.


Rename this file to my-original.ini and then rename the my-large.ini to my.ini. You’ll need to restart MySQL and then your performance should increase a bit but you may want to wait for the next step.


2.) Fine tune your my.ini file

Chances are you probably haven’t come across this thread on Drupal.org. To further fine tune your installation, simply follow the steps outlined in that document.


Replace your MyISAM configuration with what they have there. It should look like this:


port = 3306
socket = /tmp/mysql.sock
key_buffer = 384M
max_allowed_packet = 64M
table_cache = 4096
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 64M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M


When you’re done, turn your attention to your InnoDB configuration. Be careful here, or your installation won’t restart!


Simply delete your data log files in /wamp/bin/mysql/mysql5.5.24/data  and change it to:


innodb_buffer_pool_size = 384M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 10M
innodb_log_buffer_size = 64M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 180

..and you’re all set.


The final change isn’t listed there but you should set your

max_allowed_packet = 64M


Easy enough, right?


3.) Disable extraneous modules

If you’re not using a module — disable it! Extraneous modules will slow down the system and bloat your Drupal 7 installation.


As an added measure, locate the Update Manager module in /admin/modules and disable that. Since you’re likely already updating these, you won’t need the update module on your local install. Once you push to a production environment, this module should be enabled.


4.) Increase your realpath_cache_size

On systems like Drupal 7 that may require PHP to open many files, it is a good idea to increase the size of this option.


To do so, open your php.ini file, and find the realpath_cache_size option. If it’s commented out with a semicolon (;) then uncomment it. Change the value to 2M and save the file. To make this go in effect, you’ll need to restart PHP via the WAMP interface.


This has been known to greatly increase the performance in Windows 7 machines.


5.) Allow mysqld.exe through your firewall

Go into your Windows Firewall settings as illustrated by this image:


windows-firewall settings


You’ll then want to click the “Change Settings” button (Note: This is for Windows 7 and may vary depending on your platform). Once you’ve clicked this button, simply click the “Allow Another Program” button at the bottom. As the new window pops up, click “Browse” and locate your mysqld.exe file. For me, this was located at C:\wamp\bin\mysql\mysql5.5.24\bin\mysqld.exe. Click OK, once you find it and Viola! Another speed increase.


Hopefully these tips helped you. If you have any additional tips, please let us know and we’ll add them to the list!

Related Posts