If I want to re-initialize my installation to make it like it was when I first installed it, can I simply drop the database and re-run the installation?
Here are the steps I followed:
1.) Drop the database
2.) Recreate the database as described in the INSTALL.mysql.txt
If the database name changed, edit
[drupal home]/sites/defualts/settings.php
and change the value for $db_url
3.) set write permissions on sites/defaults
4.) Re-run the installer program:
http://yourdrupalsite.com/install.php
5.) clear write permissions on sites/defaults
Is there anything else I need to do? e.g,. delete anything at the filesystem?
Or would I just be better off removing and then reinstalling the drupal package?
Comments
Updated notes, for Drupal 6 on linux
If you want to re-initialize (e.g., start over from the beginning):
CAUTION: THIS WILL DESTROY EXISTING DATA.
IF YOUR WEBSERVER OR MYSQL DATABASE ALSO HOST ANY OTHER DRUPAL WEBSITES,
REQUEST HELP FROM A SYSADMIN
Database related tasks
SQL> drop database myd6db;SQL> create database myd6db;[see the instructions from INSTALL.mysql.txt ]
$ chmod u+w sites/defaults/settings.php$ vi sites/defaults/settings.phpchange the value for $db_url
$ chmod u-w sites/defaults/settings.php$ chmod u+w sites/yourdrupalsite.com/settings.php$ vi sites/yourdrupalsite.com/settings.phpchange the value for $db_url
$ chmod u-w sites/yourdrupalsite.com/settings.phpSet the filesystem permissions so Install can write
$ sudo chmod o+w sites/default$ sudo chmod o+w sites/yourdrupalsite.comDelete any files that had been uploaded to the old installation
$ sudo rm -R sites/default/files/*$ sudo rm -R sites/yourdrupalsite.com/files/*Then re-run the installer program
http://yourdrupalsite.com/install.php
Then reset the filesystem permissions
$ sudo chmod o-w sites/default$ sudo chmod o-w sites/yourdrupalsite.comThe advantage of this procedure is that your modules and themes stay intact, without having to re-install them. Specifically:
sites/all/modules
sites/all/themes
sites/yourdrupalsite.com/themes
These instructions may work for Drupal 5 as well ..., I only worked with Drupal 5 briefly so cannot verify.