Copy and Paste a Drupal site from online server to localhost

bradleycarter25 - October 1, 2009 - 05:17

Ok. So I am pretty new to drupal. I recently had my site crash, and I started totally over. It is now back up and running. But now I have decided that I would like to copy the live version and paste it to a localhost so I can try out modules before going live.

I know I'm doing this backwards. I should have started the other way.

Anyway, I have cpanel and I used it to backup the sql database. When I used MyPHPadmin to import it to my localhost it had an error.
Then I used myPHPadmin on the cpanel to export, then imported with MyPHPadmin. That worked.

I copied my home directory to the localhost.
When I installed Drupal and go to the home page I get the following error message:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'i18nblocks_theme_blocks' was given in /Applications/MAMP/htdocs/includes/theme.inc on line 617.

Repeated 5 times.

My blog posts are there, the menu is there. There is no theme, everything is just LEFT justified.

Here is my status report online:

Drupal 6.14
Access to update.php Protected
CAPTCHA Already 0 blocked form submissions
Configuration file Protected
Cron maintenance tasks Last run 12 min 48 sec ago
You can run cron manually.
Database updates Up to date
Drupal core update status Up to date
File system Writable (public download method)
GD library bundled (2.0.34 compatible)
Kaltura module Configured
Module and theme update status Up to date
MySQL database 5.0.81
PHP 5.2.9
PHP memory limit 48M
PHP register globals Disabled
Protected nodes access rights At least one of the roles has access to protected contents
Unicode library PHP Mbstring Extension
Update notifications Enabled
Web server Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
jQuery Update 1.2.6

My localhost has no administration links or options so I can't find it's status report.

My localhost is a mac

Are you saying that you ran

marcvangend - October 1, 2009 - 06:42

Are you saying that you ran the installation script again on localhost? That shouldn't be necessary. I would:
- Export the database on live server
- Import the db on localhost
- Copy all files (Drupal root folder and everything below, make sure .htaccess is also copied) from the live server to localhost
- If necessary, adjust the db settings in settings.php manually
That should usually work. If it doesn't, don't forget to check the apache/php error logs.

Yes I did run the

bradleycarter25 - October 1, 2009 - 16:06

Yes I did run the installation script again. So I started over. I cleared out the home directory and database. RE-imported, and RE-copied the files over including .htaccess.

I then adjusted the settings.php.

One extra step I had to do was up the memory usage in conf/php5/php.ini to 48MB rather than only 8.

Now it is working! Thanks!

Does 48 sound high or is that normal?

Glad that it's working. Some

marcvangend - October 1, 2009 - 17:35

Glad that it's working.
Some sites can do with less than 48, others need more... 48 is not exceptional I guess. Search this site for memory_limit, a lot has been said about it already.

See wrong page

baltusf - October 2, 2009 - 12:37

Hi,

I did the above, but have a small problem. I had the site on the liver server in anothe map, namely drupal.
Then see it i went to http://mysite.com/drupal

I now copied it to my localhost and when I type http://127.0.0.1/drupal I see the fromt page, but when i click on an item i got the xampp page (http://127.0.0.1/xampp) In the link i see http://127.0.0.1/drupal/node/15

Must I change something else?

Thanks,
Fred

I found it

baltusf - October 2, 2009 - 12:43

Hi,

I see what the problem is... http://127.0.0.1/drupal/node/15 will not work on my local server....
How can i get that working? It works witeh : http://127.0.0.1/drupal/?q=node/15

Thanks,
Fred

Fred, that means that clean

marcvangend - October 2, 2009 - 13:55

Fred, that means that clean url's are not working on your server. See http://drupal.org/node/15365.

 
 

Drupal is a registered trademark of Dries Buytaert.