Okay
  Public Ticket #3663000
How to Export Full Table Format from one Server to Another with identical software on both
Closed

Comments

  • Robert B. Naylor started the conversation

    I have 2 Domains on the same hosting provider in two separate directories and I am able to access my MySQL Database on the one Domain from the other Domain, both using WPDataTables (licensed for 3 sites/domains).  I want the other domain to be able to access the same report.  I thought if I could Export it from one domain and import it somehow to the other domain with the WPDataTables software, that would work, but don't know how.  Alternatively, if I could give it the path of the report on the other domain through a shortcode, that would work too?

    Any thoughts?

    I don't want to have to recreate each report twice, when both WPDataTables can see the one MySQL database.


    Thank you,


    Robert

  •  1,805
    Miloš replied

    Hi Robert,

    Can you tell me which table types are you using for this use-case?

    Are they SQL Query based tables, or perhaps Manual, or linked from a live data source, etc?

    -

    For example, if you were to migrate all table data from one website to another, we can advise how we usually do that :

    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.

    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.


    2. But you mentioned to somehow call a shortcode from another website's Plugin.

    This is not possible, each website functions with its own wpDataTables installation and each Site has its own WordPress SQL Database.


    Let's say if you use SQL Query based Tables, and if you wish to call one SQL data from the other Site's SQL table.

    Then, you would add that 'other' WordPress SQL Database as an "external DB Connection" on this 'current Site' you are using;

    and then you can choose that external Database to call the SQL Query data from it.

    Please check more details how to add a 'separate DB connection' via our Plugin to call data from another Database on this Page.


    I hope that helps.

    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

  • Robert B. Naylor replied

    Thanks for your response. I have the one domain wpDataTables going against the other domain’s world mySQL tables, using SQL direct connection Link type, it is just the “report format” from the one domain I want to copy to the other domain, so that I don’t have to hide, move, rename headers, search options, and other report parameters for each column and overall report formatting. 

    Thanks. 

  •  1,805
    Miloš replied


    Hi Robert,

    Thank you for the clarificaion.

    If I understood, you basically wish to migrate only the table data along with the full table configuration such as column settings, etc., so that you don't have to change anything to have the table exactly as it was from the other site.

    Sorry to disappoint you, but at this time we don't have an easy way to do that.


    1. For example, if you were to use our simple Export Table Tools, it has certain limitations ( which you can see on the hyperlinked Page).

    In short, it just exports the values themselves, without any kind of formatting, etc, or column settings, so that is not your goal.


    2. The only other two ways are either to export the entire Site( which if I understand you don't wish to do);

    Or, if you wish to only take the Plugin+table settings data without anything else, that would require the approach I explained previously, these are the steps :

    Other than cloning the site, another option would be to copy all database tables (wp_wpdatatable_#) along with tables wp_wpdatatables, wp_wpdatachartswp_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

    We realise 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.


    Or, for example, if the other Site has a different SQL Database Table Prefix, and if you have Manual Tables, then you would also need to update the DB Prefix in our Plugin's data after you move it there, here are the full details if you encounter an issue like that :

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

    For example, if you correctly migrate 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 ( if that happens) if you use tables linked from CSV/Excel or other source files ( non SQL Tables).

    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 encounter any issues with changed Database Prefix or anything like this, we can help you remotely, please don't hesitate to reach out to us in a new ticket if that happens.




    Our developers are working on creating an easier way to export only the Plugin and tables/charts data to another Site, but we can't say an exact ETA when this will be finished.

    If you wish to affect this development speed of the export improvements, you can add your vote or suggestion.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.


    Let us know if you have any additional questions.

    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