WordPress.org

Ready to get started?Download WordPress

Forums

Fast Secure Contact Form
[resolved] Settings lost after migration to a new host (10 posts)

  1. Peter Wooster
    Member
    Posted 2 years ago #

    Hi,

    I migrated a site from my test site to a hosted domain, to do this I took a database dump, adjusted all absolute urls in the dump and restored to the new site. Everything worked except Fast Secure Contact form. Most of the settings were lost because the redirect address is stored as an absolute url with a fixed length (s:12:"redirect_url";s:15:"http://...) The new address is a different length,

    I can patch the length in the database dump and update these settings, but I was wondering if there was a simple way to transfer the settings?

    The settings page says to use a full url, can I use a domain relative url eg. '/myPage'?

    Thanks/peter

    http://wordpress.org/extend/plugins/si-contact-form/

  2. Peter Wooster
    Member
    Posted 2 years ago #

    This problem seems to be a common nuisance with settings stored by many plugins and WordPress itself. The simple fix is to keep the names of test and production sites the same length. So the test site for foobar.com becomes testfoobar.

    /peter

  3. mauryg
    Member
    Posted 2 years ago #

    You might look at the WP-Migrate DB plug-in. It will adjust the length of serialized data automatically as well as changing all the domain names. In my case it also allows me to dump my database without having to log in to the hosting site and using their PHPMyAdmin utility.

  4. Peter Wooster
    Member
    Posted 2 years ago #

    Thanks mauryg,

    I'll check out that plugin. The correct fix is for plugins and WordPress to stop storing full absolute url's to the local site. Why should /myPage be stored as http://mysite.com/myPage? Most servers understand that they are the same.

    /peter

  5. Mike Challis
    Member
    Plugin Author

    Posted 2 years ago #

    The form stores it data "serialized" so manual editing of the exported data or find/replace operations on the database is not recommended.

    After the new site is running, just edit each form from the settings page and check that the email addresses and redirect URL is what you want.

    Tip: Migrating forms to a new host
    http://www.fastsecurecontactform.com/tip-migrating-forms

    FAQ
    http://www.fastsecurecontactform.com/faq

    Mike

  6. Peter Wooster
    Member
    Posted 2 years ago #

    Thanks Mike for the reply. I understand that the settings are stored in a serialized format. That's why I asked if there was a reason that I shouln't use domain based urls in redirect addresses. I tried that and it appears to work

    Another workaround which I now use because seval other plugins do the same thing, is to make my test domain and proction domain names the same length.
    /Peter

  7. mauryg
    Member
    Posted 2 years ago #

    @mike
    Thanks for the clear explanation of the problem. Now if only the people at WordPress would follow the example of other systems like Drupal where the domain name is stored as a 'base address' system variable and doesn't need to be stored with every reference...

  8. Peter Wooster
    Member
    Posted 2 years ago #

    @mauryg

    I finally got a chance to try the wp-migrate-db plugin and it does a great job of migrating single level serialized arrays like those used by this plugin and contact form 7. It doesn't get multi-level arrays like thosed used by TheTheFly slider right. I've reported it to the author, but I'll continue to use it as it fixes most of the problems. /thanks

    @mike

    I understand sterilized formats, I used to be a network developer. What I don't understand is why we shouldn't use domain relative url's like /page instead of http://mydomain/page. These migrate easily and apache understands that they are the same.

    /Peter

  9. mauryg
    Member
    Posted 2 years ago #

    @Peter
    I think your use of the word 'sterilized' format was a Freudian slip. I think they are anything but sterile. I'm not an Apache expert but I think that the use of domain relative URLs has more to do with the way that PHP in the CMS constructs the reference(i.e it is 'domain base address' & 'relative page reference') rather than the server itself. I consider it a major flaw in WordPress.

  10. Peter Wooster
    Member
    Posted 2 years ago #

    Good catch @mauryg! I suspect "sterilized" was an autocorrect problem, but it is a good slip. I use the domain relative URLs with Fast Secure Contact form all the time with no ill effect. I just want to know why Mike recommends absolute URLs.

    WordPress itself puts lots of those absolute URLs into the database, but mostly in places where it's not serialized. I think some older web servers didn't understand the domain (aka root) relative form, but Apache and PHP definitely do.

    The one place I've heard of these causing a problem is feed readers, where the link to an image will need to provide the domain address, but contact forms aren't likely to be served there and plugins can make the link absolute when they create the HTML.

    /peter

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic