{"id":75,"date":"2025-11-19T20:15:06","date_gmt":"2025-11-19T20:15:06","guid":{"rendered":"http:\/\/PeterSchulzNL"},"modified":"2025-11-19T20:15:06","modified_gmt":"2025-11-19T20:15:06","password":"","slug":"run-sql-script-files","status":"publish","type":"docs","link":"https:\/\/docs.legacy.wpdataaccess.com\/docs\/run-sql-script-files\/","title":{"rendered":"Run SQL script files"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;4.19.1&#8243; custom_margin=&#8221;0px||0px||true|false&#8221; custom_padding=&#8221;0px||0px||true|false&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.19.2&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; width=&#8221;100%&#8221; custom_margin=&#8221;0px|0px|0px|0px|true|false&#8221; custom_padding=&#8221;0px|0px|0px|0px|true|false&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_text _builder_version=&#8221;4.19.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p>Button<span>\u00a0<\/span><strong>Import data\/Execute script(s)<\/strong><span>\u00a0<\/span>can be used to execute SQL script files. It allows DCL (grant or revoke access), DDL (e.g. create table, drop table) and DML (select, insert, update, delete) statements, presuming the connected user has the proper privileges (works for remote databases as well).<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.19.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p>SQL script files may contain multiple SQL statements. There is one important rule:<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.19.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h4>Every SQL statement must end with a ; and a new line<\/h4>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.19.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p>If you receive a message that your SQL file was successfully processed and you are not seeing any results, this is mostly because one or more SQL statements do not end with a ; and a new line.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.19.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p>If your SQL file is too long, you might not be able to upload it. Instead, you can add your SQL file to a ZIP file and upload the ZIP file.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.19.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p>You can also bundle multiple SQL files in a ZIP. This can be very useful, for example, if you want to copy tables, projects and\/or publications from your development machine to a production environment. Be aware, that you have no influence on the order in which SQL files are processed. Make sure there are no dependies between SQL file within one ZIP file.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.19.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p>Be<span>\u00a0<\/span><strong>CAREFUL<\/strong>! Know what you do! Do what you know! If you have never written any SQL before, don&#8217;t start experimenting here. If you corrupt a WordPress table, you might need to restore your backup&#8230; (Do you have one?<span>\u00a0<\/span><strong>Right now?<\/strong>)<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Button\u00a0Import data\/Execute script(s)\u00a0can be used to execute SQL script files. It allows DCL (grant or revoke access), DDL (e.g. create table, drop table) and DML (select, insert, update, delete) statements, presuming the connected user has the proper privileges (works for remote databases as well).SQL script files may contain multiple SQL statements. There is one important [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"<!-- wp:paragraph -->\n<p>Button <strong>Import data\/Execute script(s)<\/strong> can be used to execute SQL script files. It allows DCL (grant or revoke access), DDL (e.g. create table,  drop table) and DML (select, insert, update, delete) statements, presuming the connected user has the proper priveleges (works for remote databases as well).<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>SQL script files may contain multiple SQL statements. There is one important rule:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<p style=\"font-weight:bold;font-size:150%;padding-left:20px;\">every SQL statement must end with a ; and a new line<\/p>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>If you receive a message that your SQL file was succesfully processed and you are not seeing any results, this is mostly because one or more SQL statements do not end with a ; and a new line.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>If your SQL file is too long, you might not be able to upload it. Instead, you can add your SQL file to a ZIP file and upload the ZIP file.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>You can also bundle multiple SQL files in a ZIP. This can be very useful, for example, if you want to copy tables, projects and\/or publications from your development machine to a production environment. Be aware, that you have no influence on the order in which SQL files are processed. Make sure there are no dependies between SQL file within one ZIP file.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Be <strong>CAREFUL<\/strong>! Know what you do! Do what you know! If you have never written any SQL before, don't start experimenting here. If you corrupt a WordPress table, you might need to restore your backup... (Do you have one? <strong>Right now?<\/strong>)<\/p>\n<!-- \/wp:paragraph -->","_et_gb_content_width":"","footnotes":""},"doc_category":[4],"doc_tag":[],"knowledge_base":[],"class_list":["post-75","docs","type-docs","status-publish","hentry","doc_category-data-explorer-manage"],"year_month":"2026-11","word_count":462,"total_views":"167","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"peterschulz.nl@gmail.com","author_nicename":"peterschulz-nlgmail-com","author_url":"https:\/\/wpdataaccess.com\/author\/wpdataaccess_admin\/"},"doc_category_info":[{"term_name":"Data Management","term_url":"https:\/\/docs.legacy.wpdataaccess.com\/docs\/non-knowledgebase\/data-explorer-manage\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/docs.legacy.wpdataaccess.com\/wp-json\/wp\/v2\/docs\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.legacy.wpdataaccess.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/docs.legacy.wpdataaccess.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/docs.legacy.wpdataaccess.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.legacy.wpdataaccess.com\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":0,"href":"https:\/\/docs.legacy.wpdataaccess.com\/wp-json\/wp\/v2\/docs\/75\/revisions"}],"wp:attachment":[{"href":"https:\/\/docs.legacy.wpdataaccess.com\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/docs.legacy.wpdataaccess.com\/wp-json\/wp\/v2\/doc_category?post=75"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/docs.legacy.wpdataaccess.com\/wp-json\/wp\/v2\/doc_tag?post=75"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/docs.legacy.wpdataaccess.com\/wp-json\/wp\/v2\/knowledge_base?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}