Hi,

How do you upgrade Drupal if you install it to root?

I usually install software into subdirectories.

So when the need for upgrade comes, I just install the new files into a new subdirectory, when the upgrade is done, I just change the names of the upgrade subdirectory to the live directory.

Any step by step guide for upgrade if you install to root?

Thanks a lot.

Comments

venkat-rk’s picture

Your safest option may be to:

1.) Create a directory under public_html
2.) Copy over your live site files and db and create a test site there
3.) Upgrade the test site
4.) Move to root if everything goes well

But, beware the base url changes in 4.7. To avoid base url related problems, create a subdomain, copy the live site over to the sub-domain, upgrade the test site in the sub-domain and then move to root.

Also see this post: http://drupal.org/node/69636

Success’s picture

Are you saying create a subdirectory in public_html and have the test/upgrade site there.

Then move the subdirectory to root?

I have a question, when we move this way, do we delete the old files then move the new files?

Or do we just overwrite the old files with the new files?

And, since it's a live site, are we able to shut down the live site?

If we just overwrite or copy the new files over, won't errors appear when the move is being done?

Is there a way to upgrade without causing downtime?

venkat-rk’s picture

Yes, I meant creating a subdirectory under public_html and then moving the files in the subdirectory to root.

I have a question, when we move this way, do we delete the old files then move the new files?

The videocast on upgrading drupal recommends renaming the old drupal install, making a new drupal install and then pointing settings.php in the new drupal to the original site's db rather than overwriting. This can be confusing if you have set up the site on root.

And, since it's a live site, are we able to shut down the live site? ...Is there a way to upgrade without causing downtime?

If you are upgrading between 4.7 versions, you can use the 'Site offline' feature that will display a message to users while allowing only the admin (uid1) to work on the site in the background.

If you are upgrading from 4.6 to 4.7, I don't really know the answer. Although the question has bothered me, all my upgrading was on test sites, so I never really faced your situation. People more experienced than me should be able to answer this. If you used command line, deleting the live site's files and uploading the new ones can be done in about 30 seconds, but it sounds pretty crude and there ought to be a more sophisticated method.

The point I wished to emphasize was that whether you are moving from 4.7 development site >> live site or 4.6 >> 4.7 test >> 4.7 live, set up a subdomain for the development/test site so that you don't have to manually change links. Of course, this isn't a huge problem if you can write scripts or use a url_filter module that is mentioned somewhere on these forums.

Did I end up confusing you?