Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to move a WordPress site to a new server, but I cannot get it up and running on my local server (running XAMPP).

The site is running perfectly fine, but when I download the files, export the database and then hook everything up on my local copy, I get the following error message:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'twentyten_widgets_init' not found or invalid function name in /Users/Tim/Sites/coachhousetimbers.com.au/old/wp-includes/plugin.php on line 405

And the following when I try to access the site's dashboard:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'twentyten_widgets_init' not found or invalid function name in /Users/Tim/Sites/coachhousetimbers.com.au/old/wp-includes/plugin.php on line 405
Warning: Cannot modify header information - headers already sent by (output started at /Users/Tim/Sites/coachhousetimbers.com.au/old/wp-includes/plugin.php:405) in /Users/Tim/Sites/coachhousetimbers.com.au/old/wp-includes/pluggable.php on line 934

Any ideas and/or suggestions?

I have moved many WordPress websites in the past and this is the first time I've seen this error. I am running WordPress 3.2.1.


share|improve this question
is your new site loading from coachhousetimbers.com.au/old/ ? That's where WP is looking... –  moraleida Jun 14 '12 at 20:59
That's just where I'm trying to install the site locally. –  Leeloo Jun 15 '12 at 1:33

3 Answers 3

Try to run this search-replace script as it is able to do proper replaces inside serialized options: Search Replace DB.

share|improve this answer

What you could do is install the WP Migrate DB plugin and add the new server path and site url before exporting the database.

share|improve this answer

Here's the easy way to do it.

  1. Copy all files to your new installation exactly in the order it was in the previous installation.
  2. Download and install Notepad++ if you don't already have it.
  3. Export the db through your phpmyadmin and open the exported sql in notepad++ and press CTRL + H (find and replace dialog box).
  4. a. In find, enter your localhost url, e.g. like ( remember, no trailing slashes / "http://" or you get everything messed up).

    b. In replace, enter the production url, e.g. myproductionsite.com ( again, no trailing slashes or "http://").

Hit replace all.

  1. Now import the modified sql to your production database, change the db details in wp-config.php and then login to your wp-admin with the same credentials you used to have in localhost.
  2. Go to Settings -> permalink and choose a permalink scheme and save ( do it even if you already have a permalink scheme set.Doing this will rewrite the htaccess for you).

If you have done everything correctly, you should now have a perfectly working production site. Be sure to take additional measures for securing your site. I am not going to discuss that over here.

share|improve this answer
lol that was my last answer in stackexchange wordpress. I swear I will be the best leech ever. -1 for answering it correctly? Lawl. –  noc2spam May 14 at 10:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.