A short note about moving internal Drupal CMS site from test to the production
Target platform: Windows 2003 R2 x64, let’s call the production server PROD (of course, as always, all names, passwords and paths are obfuscated)
Packages installed on PROD:
- MySQL 5.1.28-RC-WINX64.msi (x64) – be careful and pick mirror that offers msi file and not exe. At first I downloaded from local mirror (Slovenia) and got .exe file that I couldn’t run on Windows x64.
- Apache 2.2.10 (win32)
- PHP 5.2.6 (win32) with mysql extension
Prepare empty MySQL database on PROD for Drupal:
cmd> mysqladmin -u root -p create drupal cmd> mysql -u root -p mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'topsecret'; mysql> flush privileges
Export Drupal database on TEST and import on PROD:
cmd@test> mysqldump -u root -p drupal > drupal.sql cmd@prod> mysql -u drupaluser -p drupal < drupal.sql
Copy Drupal files from Apache\htmldoc on test server to the same directory on production server. Check Drupal configuration file (settings.php) file for MySQL connection (especially for a valid password that is needed to connect to MySQL).
I did the following changes in configuration files:
I turned on the php_mysql.dll PHP extension: [PHP_MYSQL] extension=php_mysql.dll
All other PHP extensions I turned off with semicolon in front of the extension keyword (;).
Also, I copied libmysql.dll from PHP directory to Apache\bin directory.
I added index.php and index.htm in directoryIndex:
# DirectoryIndex: sets the file that Apache will serve if a directory # is requested. DirectoryIndex index.php index.html index.htm
…as well as some aliases for static content, such as:
Alias /doc "X:/DOCUMENTATION" Options Indexes AllowOverride None Order allow,deny Allow from all
I added init-connet to my.ini at the server side, the reason for this is explained in this thread.
[mysqld] init-connect="SET NAMES cp1250"