WP Data Access
  • Download
  • Support
  • Features
  • Pricing
  • Documentation
Select Page
Popular Search importsqlformqueryexport

WP Data Access

  • Getting started
  • Installation
  • What’s new?
  • Patches
  • Known limitations
  • FAQ

Data Tables

  • Getting Started
  • Creating and publishing
  • Responsive data tables
  • SEO friendly data tables
  • Adding hyperlinks
  • Extension Manager
  • Style Manager
  • Language settings
Styling
  • Style Manager
  • Premium styling
  • Global styling
  • Code Manager Styling
  • Manual styling
  • Styling issues
Filters
  • Static filters
  • Interactive filters
    • URL parameters
    • Search Panes
    • Search Builder
    • Search form
    • Advanced search
    • Geolocation search
Export & other buttons
  • Export to PDF, CSV, Excel, SQL
  • Print & copy buttons
  • Column selection buttons
  • Custom buttons
Advanced features
  • Advanced settings
  • Large tables & performance
  • Progressively SHOW MORE
  • Custom queries
  • Custom Post Types
  • Row grouping
  • Responsive master-detail
  • Master-detail tables
  • Non admin user access
Demos & tutorials
  • Demos
  • Tutorials

Data Apps

  • Data Projects
  • Projects and templates
  • Supported Data Types
  • One-To-Many relationships
  • Many-To-Many relationships
  • Registration page
  • Manage table options
  • Shortcode usage
Project Templates
  • Project Templates
  • Creating templates
  • Table Settings
  • Relationships
  • List Table
  • Data Entry
  • Reconcile
Data Forms
  • Data Forms
  • Overview
  • Project Demo
  • Page Demo
Advanced features
  • Adding filters
  • Custom validation
  • Add less/more button
  • User roles
  • Managing roles and users
  • Advanced table options
  • Advanced lookups
  • Front-end toolbar
  • Transfer to other WP site
Demos & tutorials
  • Demos
  • Tutorials

Data Explorer

  • Getting started
  • Navigation
  • Explore tables & views
  • Manage tables & views
  • Naming conventions
Manage Actions
  • Actions
Manage Settings
  • Settings
  • Search Settings
  • Geolocation Settings
  • Table Settings
  • Column Settings
  • Dynamic Hyperlinks
  • Dashboard Menus
Data Management
  • Import CSV & SQL files
  • Run SQL script files
  • Data Backup
Problems & solutions
  • InnoDB #rows estimation
  • Import file too large
  • Transfer to other WP DB

Remote Databases

  • MySQL | MariaDB
Other DBMS
  • Heterogeneous Connections
  • Using ODBC | JDBC
  • Connect to SQL Server
Premium Data Services
  • Remote wizard
  • START HERE
  • Errors and messages
  • Limitations
  • Tutorials
  • Remote Databases
    • Remote databases
    • SQL Server
    • PostgreSQL
    • Oracle
    • MariaDB | MySQL
    Remote Data Files
    • Remote data files
    • CSV files
    • JSON files
    • MS Access
    • XML files
    • Public URL
    • Synchronization
    Advanced features
    • Performance
    • Indexes

SQL

  • Getting Started
  • Tutorials
  • Visual Query Builder
  • Writing queries
  • Data exchange
  • Stored procedures
  • Database triggers
  • Scheduled queries

Business Intelligence

  • Getting started
  • Dashboards
  • Sharing dashboards
Dashboards Widgets
  • Dashboard Widgets
  • Publication Widget
  • Project Widget
  • Chart Widget
  • Custom Code Widget
  • Database Widget
  • Sharing Widgets

Table Design

  • Getting started
  • Introduction
  • Basic mode

Plugin Settings

  • Getting started
  • Plugin
  • Back-end
  • Front-end
  • Dashboard
  • Data Forms
  • Data Tables
  • Data Backup
  • Uninstall
  • Manage Repository
  • Manage Roles
  • System Info

Code

Shortcodes
  • Overview
  • wpdataaccess
  • wpdadataproject
  • wpdadataforms
  • wpdadiehard
  • wpdageomap
  • wpdawidget
Hooks & filters
  • Overview
  • Hooks
    • Overview
    • wpda_add_search_actions
    • wpda_add_search_filter
    • wpda_before_list_table
    • wpda_after_list_table
    • wpda_wpdataaccess_prepare
    Filters
    • Overview
    • wpda_column_default
    • wpda_before_simple_form
    • wpda_after_simple_form
    • wpda_construct_where_clause
API
  • WP Data Access API
  • Remote database access
  • CRUD Example
  • Extensions
    • Alternative search algorithm
    • Alternative buttons extension
Code Manager
  • Overview
  • Write code
  • Share(d) code

Import CSV & SQL files

Table of Contents
  • Import CSV file
  • Import SQL or ZIP file from Data Explorer main page
  • Import SQL file from Data Explorer table page
  • Import CSV file
  • Import SQL or ZIP file from Data Explorer main page
  • Import SQL from Data Explorer table page

Import CSV file #

  1. Upload CSV file
  2. Perform column mapping
  3. Import CSV file

Use reload to import an updated CSV file and prevent the need to remap table columns!

Import SQL or ZIP file from Data Explorer main page #

SQL files imported from the Data Explorer main page may contain any SQL statement. Make sure to end every SQL statement with a ; character and a new line. Multiple SQL files can be packed together in a ZIP file, allowing to import larger files. You must have ZipArchive installed to import ZIP files!

Click the Import data/Execute script(s) button at the top of the screen. Select the file you want to import and click Import file/Execute script(s).

Import SQL file from Data Explorer table page #

Use this feature to export/import a selected number of rows from a specific table. The import feature on a Data Explorer table page only supports the import of data into the table displayed on the page. Any other statement than an insert into the table on the page will be rejected.

Click the Import button on top of the screen. Select the file you to import and click Import File.

Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on 2022-12-08
Run SQL script files

23 Comments

  1. IDREES KHAN
    IDREES KHAN on 2020-10-04 at 3:18 pm

    sir
    in every tutorial or post the data base is bitnomi_wordpress but the plugin i cant see such database in my case. is it making any issue in future or not… what shuould i select , mysql , information schema or the other one

    Reply
    • Peter Schulz
      Peter Schulz on 2020-10-04 at 6:01 pm

      Hi Idrees,

      The bitnami_wordpress database in the video tutorials is the database where the WordPress tables are installed. You can safely select your own WordPress database.

      Sorry for not mentioning this in the tutorials! I should have explained this. Thank you for your feedback!

      Best regards,
      Peter

      Reply
  2. Javier García
    Javier García on 2020-10-29 at 1:43 pm

    Hi Peter,

    Is there any way to implement on a WordPress page a button to allow visitors to export table data?

    Thanks.

    Best regards.
    Javier.

    Reply
    • Peter Schulz
      Peter Schulz on 2020-10-29 at 2:09 pm

      Hi Javier,

      There are two ways to do this:
      (1) Create a Data Project for your table and add your table to a web page with shortcode wpdadiehard. An export button will be added automatically. If your table should be read only, set the project page type to view.
      (2) Create a publication and add default or custom export buttons. This is only available with the premium version. This is documented here: https://wpdataaccess.com/docs/data-tables-buttons/export-pdf-csv-excel-sql/

      Does this help?

      Best regards,
      Peter

      Reply
      • Javier García
        Javier García on 2020-10-29 at 2:53 pm

        I’m using the premium version actually. I didn’t realize I can use this feature. It works fine! Sorry for the inconvenience.

        But I have two questions now, with respect to the premium buttons feature:
        – An empty column is autogenerated at first position (using flat tables). When the table is exported, this column appears on files. Could I avoid this?
        – This way only allows to export the rows showed at the moment. It is any way to export the entire database or, if it’s not possible, any way to add an extra view of, for example, 1000 rows?

        Thanks Peter. I really appreciate the help.

        Best regards.
        Javier.

        Reply
        • Peter Schulz
          Peter Schulz on 2020-10-30 at 12:24 pm

          Hi Javier,

          >>> An empty column is autogenerated at first position (using flat tables). When the table is exported, this column appears on files.

          Sounds like a bug. Can I see this somewhere? Doe you have a URL I can visit? I think the plugin needs to handle this.

          >>> This way only allows to export the rows showed at the moment. It is any way to export the entire database or, if it’s not possible, any way to add an extra view of, for example, 1000 rows?

          The default buttons do not support this , but you can add custom buttons. This is documented here:
          https://wpdataaccess.com/docs/data-tables-buttons/data-tables-custom-buttons/

          Here is an example of code executed from a custom button:
          https://code-manager.com/code/?wpda_search_column_code_name=Code-Manager-Export

          Or use the Code Manager:
          https://code-manager.com/blog/docs/index/shortcodes/javascript-shortcodes/

          Let me know if you need help!

          Best regards,
          Peter

          Reply
  3. Bodytayb
    Bodytayb on 2021-01-31 at 2:59 pm

    iam trying to adding third database using the plugin, but i don’t know whta is “MySQL schema:” !
    So i coudn’t add any databases because the plugin shows only two databases

    Reply
    • Peter Schulz
      Peter Schulz on 2021-02-01 at 5:27 pm

      Hi Bodytayb,

      To add a remote database you must know the schema name. Without the schema name the plugin will not be able to connect. You might see a message that you are connected, but the plugin can only use your remote database connection with a valid schema name.

      Hope this helps,
      Peter

      Reply
  4. Carl McClatchie
    Carl McClatchie on 2021-06-24 at 2:33 pm

    Hi there,

    How would I go about importing updated CSV data into a view rather than a table?

    Thanks,

    Carl.

    Reply
    • Peter Schulz
      Peter Schulz on 2021-06-25 at 6:52 am

      Hi Carl,

      The plugin actually supports inserts only. Updates are planned but not yet available. Hope to add this after the summer.

      Best regards,
      Peter

      Reply
      • Carl
        Carl on 2021-06-25 at 8:41 am

        Hi Peter,

        Thanks for the response, I have set up 3 separate imports into the parent tables to populate the view table, its rather messy and long winded and if there are only 1 or two items its actually easier to do it by hand.
        If you do come up with a way to map to views I will buy that in a flash 🙂

        Reply
  5. Adam
    Adam on 2021-09-24 at 8:59 am

    I created a table using Design table feature and tried to import csv file into the table. But there’s no option for CSV import, only sql file < 128 MB is allowed. I also don't see the import csv icon at top right corner of the data explorer page.
    Is there any way to enable it?
    Please help.

    Reply
    • Peter Schulz
      Peter Schulz on 2021-09-24 at 10:40 am

      Hi Adam,

      The workflow of the current version looks a bit different than the one in the video. Please try this:
      – Start the Data Explorer
      – Click button “imports and scripts”
      – Click tab Import CSV file
      – Click button Import CSV file
      – Click button Upload CSV file
      – Follow the procedure as shown in the video…

      Hope this helps,
      Peter

      Reply
  6. Dante Havenaar
    Dante Havenaar on 2022-01-28 at 5:55 pm

    Hi Peter,
    I watch the video how to import a sql file to create a table. Everything seems to be going well. I received the message:
    INFO: Import `NURCodes.sql` is succesvol afgerond.
    But I don’t see the table.
    I create the script with Microsoft SQL Server Management Studio 18 on my server.
    Is there something wrong in the script?

    CREATE TABLE [dbo].[NURCodes] (
    [NURCodeID] INT IDENTITY (1, 1) NOT NULL,
    [NURCode] NVARCHAR (3) NULL,
    [Rubriek] NVARCHAR (MAX) NULL,
    CONSTRAINT [PK_NURCodes] PRIMARY KEY CLUSTERED ([NURCodeID] ASC)
    );

    Kind regards,
    Dante

    Reply
    • Peter Schulz
      Peter Schulz on 2022-01-28 at 6:57 pm

      Hi Dante,

      I don’t think there is anything wrong with your script. The plugin just needs a ; directly folliwing by a new line character to identify your SQL command. The IMPORTANT commant below the import button is often overlooked. ( de kleine lettertjes 😉 )

      Hope this helps,
      Peter

      Reply
  7. Dante Havenaar
    Dante Havenaar on 2022-01-28 at 9:29 pm

    Hi Peter,

    I have seen the important message and neatly a ; put at the end of the text
    The script must at this way?

    CREATE TABLE [dbo].[NURCodes] (;
    [NURCodeID] INT IDENTITY (1, 1) NOT NULL,;
    [NURCode] NVARCHAR (3) NULL,;
    [Rubriek] NVARCHAR (MAX) NULL,;
    CONSTRAINT [PK_NURCodes] PRIMARY KEY CLUSTERED ([NURCodeID] ASC));

    Kind regards,
    Dante

    Reply
  8. Aris Papageorgiou
    Aris Papageorgiou on 2022-03-11 at 12:31 pm

    when it finds duplicates during csv import , Is it possible to update instead of trying to insert ?

    Reply
    • Peter Schulz
      Peter Schulz on 2022-03-11 at 2:01 pm

      Hi Aris,

      The import performs inserts only. If your table contains a primary or unique key, the insert will fail. This will be reported as an error. If you want to overwrite rows, you need to truncate the table before you import the CSV file (enable the checkbox when you import). Be careful! Truncate deletes all rows from the table! Not only imported rows.

      Hope this helps,
      Peter

      Reply
      • Aris Papageorgiou
        Aris Papageorgiou on 2022-03-14 at 11:01 am

        thanks for the quick response

        Reply
  9. Chris
    Chris on 2022-04-07 at 5:30 am

    Hi Peter,
    I followed the steps in the video, and the import CSV section shows me mapping successfully but I did not see something like ‘row inserted’. Thus, the table I created is still empty. It did not show any errors. What is the problem with it?

    Reply
    • Peter Schulz
      Peter Schulz on 2022-04-07 at 10:14 pm

      Hi Chris,

      Can you share your CSV and table structure? Hoping it helps to reproduce the error. Please use the contactform to send the information it in private.

      Thanks,
      Peter

      Reply
  10. Edwin Dee
    Edwin Dee on 2022-04-19 at 7:20 pm

    Can auto csv import into sql be done with your pro plugin?

    Reply
    • Peter Schulz
      Peter Schulz on 2022-04-20 at 2:25 pm

      Hi Edwin,

      Currently not, but I am working on it. Hope to launch May or June.

      But I am interested in your work flow! I would be grateful if you can drop a message through the contactform to explain the way you work and how you expect the plugin to work. The users wishlist is the developers roadmap…

      Thanks,
      Peter

      Reply

Submit a Comment Cancel reply

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

Table of Contents
  • Import CSV file
  • Import SQL or ZIP file from Data Explorer main page
  • Import SQL file from Data Explorer table page

Links

Blogs
Tutorials
Demos

Socials

LinkedIn
Twitter

Get in touch

Premium support
Free support forum
Contact us

Resources

WordPress plugin directory
YouTube tutorials

Passionate Programmers B.V. © 2017 - 2023 All rights reserved