Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8254209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:06:51+00:00 2026-06-08T01:06:51+00:00

I have SQL queries that I want to run automatically after wordpress installation has

  • 0

I have SQL queries that I want to run automatically after wordpress installation has completed. I have a php file that will reference a .sql file and automatically run all of the queries inside it, however, you have to manually browse to example.com/updateDB.php to get it to run. I am trying to get everything completely automated so I would like to insert code somewhere in the wordpress installation that basically says to run this code as if it were browsed to in a browser.

I have tried multiple things including just putting the actual php from that file into several different spots in the installation code or trying curl, etc and nothing has worked.

So in the end my question is, how can I execute the code in this file AFTER wordpress installation has completed? I’ve gotten close a few times but the code wanted to run before the database was actually setup – which of course threw an error with my UPDATE queries in the .sql file.

Here is what presently occurs:
Setup empty db
Install WordPress
browse to http://www.example.com/updateDB.php
– code executes just fine and the db is updated.

Here is what I want to happen:
Setup empty db
Install WordPress
– At some point in the process my code is triggered and the db is updated with with the code from updateDB.php (referencing the .sql file).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:06:53+00:00Added an answer on June 8, 2026 at 1:06 am

    The javascript should look something like this (obviously substituting your own file name):

    <script type="text/javascript">
    window.open("http://www.yourURL.com/path/to/your/file.php", "_blank");
    </script> 
    

    Place it at the end of the install script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several sql queries that I simply want to fire at the database.
I have 3 similar SQL queries that each will bring back 1 record with
I have several Oracle queries that perform well when run through SQL*PLUS. However when
I have functions in place that will convert the results of sql queries into
I have a number of generated .sql files that I want to run in
I have six SQL queries that I script though R that each take a
I have a couple of LINQ to SQL queries that I feel take a
I have a LINQ to SQL DataContext that queries four different tables. But I
I have an SSIS package that queries data from a view using an SQL
I have some set of SQL queries which is in a file(i.e query.sql), and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.