You are hereBlogs / hutcho's blog / Moving Drupal

Moving Drupal


By hutcho - Posted on 19 February 2009

Adding to the plethora of articles about moving a drupal site are my tips:

If you are building a development environment you will want to check this link:
http://drupal.org/node/15365

To move site do this:
1) Turn off clean urls
2) Clear the cache (can do this after restore if it is a running site)
There may be more depending on which modules you have installed.

truncate table cache;
truncate table cache_block;
truncate table cache_content;
truncate table cache_filter;
truncate table cache_form;
truncate table cache_menu;
truncate table cache_page;
truncate table cache_rules;
truncate table cache_update;
truncate table cache_views;
truncate table cache_views_data;

3) Backup database (phpmyadmin or whatever)
- Note: Use gzip rather than zip if you store BLOBs (E.g. embedded PHP)
4) Restore database
5) Update sites/default/settings.php
6) Clear the cache again
7) Clear browser history (ALL HISTORY)
8) CLOSE BROWSER, CLOSE BROWSER, CLOSE BROWSER
9) Try to login: http://sitename/?q=user
10) If you get access denied, repeat 6 and 7.
11) Enable clean urls: http://drupal.org/node/15365

Try not to get distracted with all the blogs about .htaccess rewrite rules because it is unlikely to be the problem. http://drupal.org/node/15365

Another note about .htaccess, see my blog entry about configuring access on a VPS if you want to know a bit more about .htaccess files and how they could be related to drupal directory access issues. Basically if you're not sure if this is an issue try renaming the .htaccess file to remove possible restrictions. http://clearlysecure.com.au/node/38

cJvROS

Dmutib

QHOdUgph

IaJeOqUT

LhVujI lJqxVweR

oVgxCMHz KtlcGSlL