Title: [Plugin: PHP Code Widget] PHP widget disappeared when creating local WordPress copy
Last modified: August 20, 2016

---

# [Plugin: PHP Code Widget] PHP widget disappeared when creating local WordPress copy

 *  [webmastert21](https://wordpress.org/support/users/webmastert21/)
 * (@webmastert21)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-php-code-widget-php-widget-disappeared-when-creating-local-wordpress-copy/)
 * Hello,
 * I decided to create a local PC copy of a WordPress web site.
    The local copy 
   is working fine. However, I realized that all PHP widgets disappeared on the 
   local site. I was able to recreate them based on the code on the web site. However,
   do you see any reason for this behaviour?
 * For your info, here is the high level procedure I used to create a local WordPress
   copy :
    - I installed XAMPP, copied my wordpress folder + index.php into xampp\htdocs
      directory.
    - I exported the wordpress web site database using phpMyAdmin and I replaced
      the web site URL by [http://localhost](http://localhost) in the exported database
      file.
    - Then I imported the database in my local MySQL and updated it (UPDATE wp_options
      SET option_value = “[http://localhost&#8221](http://localhost&#8221); WHERE
      option_name = “home”; UPDATE wp_options SET option_value = “[http://localhost/wordpress&#8221](http://localhost/wordpress&#8221);
      WHERE option_name = “siteurl”;)
    - Finally, I went to settings -> permaliens -> Save modifications without changing
      anything on the settings (not 100% of the wording as I am using a french wordpress
      installation).
 * So, is there any specific steps I should consider in regards to PHP widget for
   creating such wordpress local copy?
 * Thanks in advance for your support.
 * Best regards
 * P.S. Thanks for your extension
 * [http://wordpress.org/extend/plugins/php-code-widget/](http://wordpress.org/extend/plugins/php-code-widget/)

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

 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-php-code-widget-php-widget-disappeared-when-creating-local-wordpress-copy/#post-2351957)
 * Widgets and options don’t get saved in export/import operations. This isn’t specific
   to the PHP widget, no widget data is in an export.
 * Edit: Nevermind, I see you did an SQL dump.
 * I dunno, did your other widgets survive? There’s nothing special about the PHP
   widget that would make it not survive a dump operation, but I know that there’s
   more to it than just replacing the URL with “localhost” in such a move.
 *  Thread Starter [webmastert21](https://wordpress.org/support/users/webmastert21/)
 * (@webmastert21)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-php-code-widget-php-widget-disappeared-when-creating-local-wordpress-copy/#post-2352112)
 * I am using another widget called “Random Text”. This widget worked ok after the
   local copy. I did not have to modify anything for it.
 * For the PHP widget, I had to put them back in the Global Margin & in the various
   columns for the bottom part of the page and I had to copy back the php code into
   the widgets. Here is the link to our site to make it more explicit : [http://www.t21.ch](http://www.t21.ch)

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

The topic ‘[Plugin: PHP Code Widget] PHP widget disappeared when creating local 
WordPress copy’ is closed to new replies.

 * ![](https://ps.w.org/php-code-widget/assets/icon.svg?rev=992095)
 * [PHP Code Widget](https://wordpress.org/plugins/php-code-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/php-code-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/php-code-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/php-code-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/php-code-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/php-code-widget/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [webmastert21](https://wordpress.org/support/users/webmastert21/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-php-code-widget-php-widget-disappeared-when-creating-local-wordpress-copy/#post-2352112)
 * Status: not resolved