I have a working local Drupal 7 site (with local MySQL Database), but now I'm trying to migrate it to Amazon Web Services (which is currently running a test Drupal site successfully). I have all of my drupal files in a directory mydrupalsite
on the EC2 instance server and the database has been added to the remote MySQL, but I don't know what to do now in order to configure apache to show the new site.
What I have tried so far:
- I added the file in
/etc/apche2/sites-available
(copied the old instance and changed the directory name where appropriate) - I changed the symlinks (deleted the old symlink and added a new one) in
/etc/apache2/sites-enabled
so that only the new file is pointed to. - Then I rebooted the server and navigated to the site, but it's taking me to the install page (as though i were starting over)
Here are the contents of $databases variable in the settings file on my local machine (with username changed but the pw is an empty string)
if (!isset($databases)) {
$databases = array();
}
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => 'naicdrpl',
'username' => 'mylocalsiteusername',
'password' => '', // password is an empty string
'host' => '127.0.0.1',
'port' => 33067 );
Okay it appears the issue was that settings.php did not have the needed configuration. Here was the solution that worked for me:
Thank so much to everyone who helped!
You can do it in the GUI with the Backup and Migrate module https://www.drupal.org/project/backup_migrate
You can use backup&migrate module for migration. It is very easy for using.
/sites/default/settings.php file
./admin/modules
and enable backup and migrate./admin/config/system/backup_migrate/restore
upload your backup file and click restore buttonNOTE 1 (database settings):
For Drupal installation of course you need to have database. You should just create empty DB and set up user for that database. You should also set up password for that DB user and give him full privileges. In settings.php file you then change that data:
Basically here you set up Drupal site on empty database you created on new server. After that you fill that database using backup and migrate module.
NOTE 2 (settings.php file premissions):
When you migrate site and (in your case replace old one with new) you want to change settings.php file there can be a little problem with write permissions of the settings.php file. It is a common case that by default you can't change settings.php so in order to edit/replace that file you need to change permissions of the file and also of the folders where this file is placed. With no write permissions you can end up with new site and old settings.php file (the settings.php file from site you migrate will not overwrite old file).
Hope this helps.