Error after moving WordPress installation

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:

Read More
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.

Thanks!

Related posts

Leave a Reply

4 comments

  1. Is the site still working/displaying properly , other than this error on the front end?

    It looks to me like your new hosting environment has warning and notice reporting ON.

    Consider looking in your wp-config.php file for WP_DEBUG and make sure it’s set to false.

    Depending on how much control you have on your hosting environment, you should contact your hosting provider to adjust the PHP error_reporting to only errors.

    EDIT: I would first suggest going into your development location and looking in your wp-config.php file for WP_DEBUG and make sure it’s set to true.

    The best way to avoid these warnings is to fix them at the source. It’s probably a very simple fix – it looks like the function twentyten_widgets_init doesn’t exist within your theme, which if you forked the twentyten theme instead of creating a child theme, is likely the case. You may have mistakenly renamed the function without addressing the hook where it’s being attached.

  2. 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 127.0.0.1/mywpinstallation ( 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.