• Hi, I’ve got an unusual error when trying to migrating my WordPress site from Bluehost to DigitalOcean. I’ve extracted the root WordPress folder to var/www/html/mydomain, set the Apache virtual host, imported database and adjusted the value in wp-config.php. I haven’t change anything except changing the domain value in wp_options from https:// to http:// (because I plan to disable http temporarily and create a new certificate after migration success)

    When trying to access any page, including wp-admin dashboard, I got the following error which returns 500 response code.

    [php7:error] [pid 8715] [client 52.77.206.243:60722] PHP Fatal error: Uncaught Error: Cannot unset string offsets in /var/www/html/mydomain/wp-includes/widgets.php:1142\nStack trace:\n#0 /var/www/html/mydomain/wp-includes/widgets.php(1115): retrieve_widgets(true)\n#1 /var/www/html/mydomain/wp-includes/class-wp-hook.php(288): _wp_sidebars_changed('http://www.mydo...')\n#2 /var/www/html/mydomain/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)\n#3 /var/www/html/mydomain/wp-includes/plugin.php(453): WP_Hook->do_action(Array)\n#4 /var/www/html/mydomain/wp-includes/theme.php(2752): do_action('after_switch_th...', 'http://www.mydo...', Object(WP_Theme))\n#5 /var/www/html/mydomain/wp-includes/class-wp-hook.php(286): check_theme_switched('')\n#6 /var/www/html/mydomain/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)\n#7 /var/www/html/mydomain/wp-includes/plugin.php(453): WP_Hook->do_action(Array)\n#8 /var/www/html/mydomain/wp-settings.php(450): do_action('init')\n#9 /var/www/html/mydomain/wp-confi in /var/www/html/mydomain/wp-includes/widgets.php on line 1142

    The PHP version is PHP 7.2.10-0ubuntu0.18.04.1. WordPress version is 4.9.9
    What should I do to fix it?

    • This topic was modified 7 years, 2 months ago by ivanchibi.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Cannot Unset String Offsets Error when Migrating’ is closed to new replies.