Making a local copy


Working off-line on your websites offers major advantages and minor disadvantages.

Advantages:

  • You don't depend neither on your internet connection nor on your web hosting company.
  • This results in an incredibly fast working website, ideal to show your customers. At the same time this is also the downside. High expectations might be deluded, especially if you're using Flash.
  • You have a backup of your sites. If you make regularly an image copy of your harddisk, you have double redundancy.
  • You have a test environment. You don't put at risk your live sites.

Disadvantages:

  • If you're using full-path URL's refering to online content, they do not work when you're offline. If you refer to a path on your own server, try to use the abbreviated path (without http://yoursitename/) to avoid having to convert everthing to work offline.
  • API keys, such as for Google maps, won't work.
  • E-mail setup to work from your local computer can be more complicated.
     

Steps:

  • Make sure your local macchine can act as a server. Use a package like XAMPP-lite. Remember to keep Apache, PHP and MySQL version as much the same as the one you have on your server.
  • Create a new folder to place your site in the directory c://xampplite/htdocs or similar.
  • Place the unzipped Drupal in it. Make sure a settings.php is present in the sites/default folder. If not make a copy of default.settings.php.
  • Copy all themes, modules, files, plugins folders inside the side folder.
  • Create a new database with phpMyAdmin navigating to http://localhost.
  • Run install.php. Use the newly created database name with user: root and leave the password blank.
  • Drop all the tables of your local newly created database
  • Make a gzip export of your live site if you didn't already, using phpMyAdmin on your hosting's cPanel account.
  • Import this file locally using phpMyAdmin.
  • After succesful import, navigate to http://localhost/yoursite/user. Login with the same admin username and password of the live site.
  • Navigate to http://localhost/yoursite/update.php.
  • Go to the Home page and navigate to check all menu items.
  • Make regularly (e.g. each month) an image file of your computer's harddisk on an external drive, using Acronis or similar. Additionally you can use an automated file backup, like Memeo, more often (e.g. weekly). This way you have triple redundancy.