Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #865141

    Chris Stovall
    Participant

    I’m still hoping we can get some type of long term or cemented explanation from X Theme on the “right way” to move a MySQL DB to a testing server and back to a live server. This is something every dev has to do. The tried and true way of running a script to update the DB with the new URL works 95% of the time. The other percent though… When it goes bad… It’s not salvageable. I’ve had it happen twice now.

    So now to my question. I’m using CPanel to make and restore a backup of the MySQL DB.

    This appeared in the MySQL dump and I would like to know what it means and how it might affect the cornerstone data. This is a lot of errors and warnings and since it’s same site I’ve had SO many issues with, I need to be sure about what I’m seeing.

    /*!40000 ALTER TABLEwpgtg_store_wpress` ENABLE KEYS */
    ————–

    ————–
    UNLOCK TABLES
    ————–

    ————–
    DROP TABLE IF EXISTS wpgtg_store_wpress_category
    ————–

    ————–
    /*!40101 SET @saved_cs_client = @@character_set_client */
    ————–

    ————–
    /*!40101 SET character_set_client = utf8 */
    ————–

    ————–
    CREATE TABLE wpgtg_store_wpress_category (
    id int(11) NOT NULL AUTO_INCREMENT,
    name varchar(120) NOT NULL,
    marker_icon varchar(200) NOT NULL,
    PRIMARY KEY (id)
    ) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1
    ————–

    ————–
    /*!40101 SET character_set_client = @saved_cs_client */
    ————–

    ————–
    LOCK TABLES wpgtg_store_wpress_category WRITE
    ————–`

    Please advise and thank you in advance.

    #865524

    Paul R
    Moderator

    Hi Chris,

    Thanks for writing in!

    WordPress stores many options as “serialized data”, which contains both the string content of things and their length. So when you modify the URL and the length changes, then the serialized data is no longer correct, and PHP rejects it.

    If you are setting up a development site that will have its data migrated, then it should have the exact same URL as your production site to begin with. You can manually edit your HOSTS file to give that production domain (like example.com) a different IP address (like 127.0.0.1) and thus the “production” URL will become the development site, for you only. Then you can create your data and links and everything else using that production URL, and when you migrate the data, nothing about it has to be altered.

    If editing your hosts file is not possible you need to backup and migrate using a third party plugin.
    The plugin will make sure that serialize data is properly updated

    We have created a detailed article regarding – https://community.theme.co/kb/cornerstone-migration/

    Hope that helps