Title: Cannot Unset String Offsets Error when Migrating
Last modified: January 21, 2019

---

# Cannot Unset String Offsets Error when Migrating

 *  [ivanchibi](https://wordpress.org/support/users/ivanchibi/)
 * (@ivanchibi)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/cannot-unset-string-offsets-error-when-migrating/)
 * 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](https://wordpress.org/support/users/ivanchibi/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [pramadiputra](https://wordpress.org/support/users/pramadiputra/)
 * (@pramadiputra)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/cannot-unset-string-offsets-error-when-migrating/#post-11115483)
 * Were you using different PHP version when your web was in BlueHost?
 *  Thread Starter [ivanchibi](https://wordpress.org/support/users/ivanchibi/)
 * (@ivanchibi)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/cannot-unset-string-offsets-error-when-migrating/#post-11117706)
 * [@pramadiputra](https://wordpress.org/support/users/pramadiputra/) The PHP version
   in Bluehost was 5.6. I’ve tried to switch to 5.6 too in the new server but still
   got the same error

Viewing 2 replies - 1 through 2 (of 2 total)

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [ivanchibi](https://wordpress.org/support/users/ivanchibi/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/cannot-unset-string-offsets-error-when-migrating/#post-11117706)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
