Okay
  Public Ticket #3723555
Wordpress folder migration
Closed

Comments

  • Kristian started the conversation

    I recently moved my Wordpress installation from a subdomain (store.mydomain.com) to the main domain (mydomain.com) So as expected the wpDataTables plugin can't find the source files .CSV 

    The error shows:
    Provided file /home/customer/www/store.mydomain.com/public_html/wp-content/uploads/mysourcefile.csv does not exist!

    Where in the database or files can I manually change this path? I would rather change the path than to make all the tables and charts all over again. 

    Thanks for your help!


  •  1,846
    Miloš replied

    Hi Kristian,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.


    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 i understood, you can see the tables in your WordPress database, and you have already migrated everything.

    if you correctly 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 ensure to mark the reply as  PRIVATE, so it is safe, only we can see it.


    I hope that helps.



    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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