Okay
  Public Ticket #3685605
WP Data Table - Data Migration to Other WP Site
Open

Comments

  • Prima started the conversation

    Hi, 

    I am migrating my website from one server to another server with a purpose to get a better server infrastructure. The migration has been done, however all of the WP Data Table doesnt seem get copied over, despite I have extracted all sql data from phpmyadmin. Do you where i should look at about this data? Is there any other alternative to extract this wp data table (there are 7-8 tables) and import it to my new wordpress site?
    Thank you for your help.

    Best regards,

    Prima

  •  1,767
    Miloš replied

    Hi Prima,

    I will do my best to advise you everything on the subject of migrating/moving all your data from one Site to another.

    When you are moving on live site from local or stage site (or vice-versa) we can suggest using Plugin Duplicator. We use it and it's working fine because it will transfer all the files and also the tables to the database. 

    Other than cloning the site, another option would be to copy all database tables (wp_wpdatatable_#) along with tables wp_wpdatatables, wp_wpdatacharts, wp_wpdatatables_rows and wp_wpdatatables_columns. Then, in wp_options table, you would also need to export the following option_names:

    • wdtPreventDeletingTables
    • wdtUseSeparateCon
    • wdtSeparateCon
    • wdtTimepickerRange
    • wdtTimeFormat
    • wdtTabletWidth
    • wdtTablesPerPage
    • wdtSumFunctionsLabel
    • wdtRenderFilter
    • wdtRenderCharts
    • wdtIncludeBootstrap
    • wdtIncludeBootstrapBackEnd
    • wdtPreventDeletingTables
    • wdtParseShortcodes
    • wdtNumbersAlign
    • wdtBorderRemoval
    • wdtBorderRemovalHeader
    • wdtNumberFormat
    • wdtMobileWidth
    • wdtMinifiedJs
    • wdtMinFunctionsLabel
    • wdtMaxFunctionsLabel
    • wdtLeftOffset
    • wdtTopOffset
    • wdtInterfaceLanguage
    • wdtGeneratedTablesCount
    • wdtFontColorSettings
    • wdtDecimalPlaces
    • wdtCSVDelimiter
    • wdtDateFormat
    • wdtCustomJs
    • wdtCustomCss
    • wdtBaseSkin
    • wdtAvgFunctionsLabel
    • wdtInstallDate
    • wdtRatingDiv
    • wdtMDNewsDiv
    • wdtTempFutureDate

    It is rather cumbersome to do all this, but unfortunately at the moment, it's the only way. 

    Important to note, for tables linked to an existing data source, you would need to change the file path, because at the moment the file path depends on the domain, so if you change the domain, the URL to the file will also have to be changed.


    2. Now, if you encounter any issue like that, for example :

    When you changed the domain, the path to the files for the source data of tables most likely changed, and it is also possible that you changed your Database Table Prefix.

    If you can see the tables in your WordPress database, and you have already migrated everything, but the table data is empty, then the path to the files most likely changed.

    Here is what you can do to fix it.

    First, to check what is the "new path" for tables on your new site,

    you can create a new table linked to any Excel file ( or CSV file), and it should generate just fine. 

    Once you do that, access your database, and open 'wp_wpdatatables' database table.

    ( the wp_ prefix is default WordPress Database table prefix, on your site it might be different)

    In the "content" column, you will see the path related to the new table. 

    6078389527.png
    1893629511.png

    So, if the new file is stored in (for example):

    /var/www/html/your_NEW_site/wp-content/uploads/2021/02/file-one.xls

    And your old files are in:

    /var/www/html/your_OLD_site/wp-content/uploads/2021/02/file-two.xls

    You need to modify the content column for each row, and replace the path.

    To do that, you can run this SQL command on your database ( via your database management tool, such as PHPMyAdmin):

    UPDATE `wp_wpdatatables` SET content=REPLACE(content,'this_part','that_part')
    

    Please bear in mind that wp_ is the default prefix of WordPress, 

    but on your site it could be anything, so you should run `your_prefix_wpdatatables` and actually replace the part of the path in "this_part" and "that_part" sections.

    Additional step if you have Manual Tables, then most probably you also have a different SQL Database Table Prefix now on your new Site.

    If you can access directly to your Database, via PHPMyAdmin or any other DB Management Tool ( you can ask your hosting support if you're not sure how to access it);

    then you can run this Query on your Database, in order to update to your current DB Table Prefix in our Plugin's data:

    UPDATE `wp_wpdatatables` SET mysql_table_name=REPLACE(mysql_table_name,'wp_','NewDBPrefix_');

    Please bear in mind that wp_ is the default table prefix of WordPress,

     but on your old and new site it could be anything, so check what is your DB table prefix,

    then you should run `your_prefix_wpdatatables` and actually replace the part of the path in wp_" and "xyz_" sections.

    That replaces the prefix in the "mysql_table_name" column. 

    Once you do this, you should be able to simply load all your manual tables without issues.

    -

    If you're unsure how to do this, we can do it for you if you can provide me with a temporary WP-Admin user (administrator) credentials, 

    and database (phpMyAdmin) URL with access credentials.

    If you send us access, just make sure to mark the reply as PRIVATE, so then only we can see it.

    I hope that helps.



    Our developers will be working on adding an easier solution to export everything, but we can't say an ETA on this.

    - There are also certain export functionalities, to export individual tables using Table Tools.

    - If you also need to switch domains;

     In our store you can go to "My Licenses" and click on the "Manage Domains" button:

    8694120960.png

    From there, you will be able to deactivate the old domain (while it's still active), and then simply activate the new domain in wpDataTables settings/Activation, once you move the site.


    Also note : In regards to licence activation, you are not obligate to activate it on a Staging/Dev Site, there you can just manually install and update it, while it is recommended to have it activated on the live/production Site.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables