wpDataTables Error: Provided file does not exist after moving site

In wpDataTables you can setup tables using an input source like an xlsx or csv. This is great for data that needs to be updated frequently because you can just replace the spreadsheet.

However, once you move your website from say a development server to a live server because you are ready to launch the site, you might find the table is no longer accessible in the front end or the backend. Even in WordPress when you go to click on your table in the wpDataTables plugin you will be given an error message like this:

“Error Provided file /nas/content/live/user/wp-content/uploads/spreadsheet.xlsx does not exist!”

Unfortunately, this completely restricts your access to the table. You can’t just switch the data source. However, if you have access to cPanel and phpMyAdmin you can fix this.

How to find and replace wpDataTables input source file URL – cPanel hosting

  1. Login to cPanel
  2. Open up File Manager and navigate to the spreadsheet folder within your uploads. You should be able to see which uploads folder its in based on the error message.
  3. Select the spreadsheet, and then look at the left side of the screen:

    You will need to combine these two URLS to create the full, starting with the URL on the bottom and then the one on the top, e.g.:/home/user/public_html/prelive/wp-content/uploads/2021/06/spreadsheet.xlsx
  4. Now, close File Manager and return to cPanel.
  5. Click on phpMyAdmin
  6. Select your WordPress database
  7. Select the table “wp_wpdatatables”
  8. Now you should see a list of all your tables. Find the table you need to fix.
  9. In the “content” column you will see the spreadsheet url, click into this table cell and replace with the new URL
  10. Check your website, the issue should now be fixed.

 

 

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *