• 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 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” WHERE option_name = “home”; UPDATE wp_options SET option_value = “http://localhost/wordpress” 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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    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

    (@webmastert21)

    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

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.