Title: PHP Error After Migration to Localhost
Last modified: January 20, 2023

---

# PHP Error After Migration to Localhost

 *  [agon024](https://wordpress.org/support/users/agon024/)
 * (@agon024)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-migration-to-localhost/)
 * After pulling down a site to my localhost along with the sql database I get an
   error:
 * **Fatal error**: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::
   __construct(), 0 passed in C:\xampp\htdocs\district4\wp-includes\class-wp-widget-
   factory.php on line 62 and at least 2 expected in C:\xampp\htdocs\district4\wp-
   includes\class-wp-widget.php:163 Stack trace: #0 C:\xampp\htdocs\district4\wp-
   includes\class-wp-widget-factory.php(62): WP_Widget->__construct() #1 C:\xampp\
   htdocs\district4\wp-includes\widgets.php(115): WP_Widget_Factory->register(‘WPGCWidget’)#
   2 C:\xampp\htdocs\district4\wp-content\plugins\wp-gcalendar\admin\partials\widgets.
   php(51): register_widget(‘WPGCWidget’) #3 C:\xampp\htdocs\district4\wp-includes\
   class-wp-hook.php(308): WPGC_widget_init(”) #4 C:\xampp\htdocs\district4\wp-includes\
   class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #5 C:\xampp\htdocs\
   district4\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #6 C:\xampp\
   htdocs\district4\wp-includes\widgets.php(1854): do_action(‘widgets_init’) #7 
   C:\xampp\htdocs\district4\wp-includes\class-wp-hook.php(308): wp_widgets_init(”)#
   8 C:\xampp\htdocs\district4\wp-includes\class-wp-hook.php(332): WP_Hook->apply_filters(
   NULL, Array) #9 C:\xampp\htdocs\district4\wp-includes\plugin.php(517): WP_Hook-
   >do_action(Array) #10 C:\xampp\htdocs\district4\wp-settings.php(617): do_action(‘
   init’) #11 C:\xampp\htdocs\district4\wp-config.php(93): require_once(‘C:\\xampp\\
   htdocs…’) #12 C:\xampp\htdocs\district4\wp-load.php(50): require_once(‘C:\\xampp\\
   htdocs…’) #13 C:\xampp\htdocs\district4\wp-blog-header.php(13): require_once(‘
   C:\\xampp\\htdocs…’) #14 C:\xampp\htdocs\district4\index.php(17): require(‘C:\\
   xampp\\htdocs…’) #15 {main} thrown in **C:\xampp\htdocs\district4\wp-includes\
   class-wp-widget.php** on line **163**
 * So after downloading the site I changed the wp-config.php to the correct localhost
   and DB info,. imported the database into phpmyadmin, change the “siteurl” and“
   home” rows in the wp-options table to the localhost domain (localhost/district4).
   Upon loading the site I get the error above. I have also tried to change the 
   theme manually in the wp_options table “twentytwentytwo” and that didn’t fix 
   the problem either. This is something I have done this many times and I have 
   never had this happen.
 * I am using a newer version of XAMPP running **8.1.12** and the server this came
   from is running **PHP 7.4.29**.
 * Are the two different PHP versions the problem? How can I fix this?
    -  This topic was modified 3 years, 4 months ago by [agon024](https://wordpress.org/support/users/agon024/).
    -  This topic was modified 3 years, 4 months ago by [agon024](https://wordpress.org/support/users/agon024/).

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

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-migration-to-localhost/#post-16391991)
 * Do not use PHP 8.1, rather use 8.0. WordPress still has its problems with 8.1
   in some places.
 * Furthermore, the message is actually caused by the plugin “[WP Google Calendar Manager](https://de.wordpress.org/plugins/wp-gcalendar/)“.
   This hasn’t been updated for 5 years, so it will definitely not be compatible
   with newer PHP versions. It should also be compatible with newer WordPress versions.
   Remove the plugin and the message should be gone.
 *  [samoue](https://wordpress.org/support/users/samoue/)
 * (@samoue)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-migration-to-localhost/#post-16396936)
 * Thanks
    -  This reply was modified 3 years, 4 months ago by [samoue](https://wordpress.org/support/users/samoue/).
    -  This reply was modified 3 years, 4 months ago by [samoue](https://wordpress.org/support/users/samoue/).

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

The topic ‘PHP Error After Migration to Localhost’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 3 participants
 * Last reply from: [samoue](https://wordpress.org/support/users/samoue/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-migration-to-localhost/#post-16396936)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
