I have just begun using a live server for testing my php scripts and I am aware of how you can automatically create a table with the IF NOT EXISTS query. But how does one create a database automatically? I have had to manually select a db name and password on my host and I am now wondering as to how WP does it all automatically.
Well, I have it installed on the xampp server. All I had to do was copy paste the wordpress install in the htdocs folder. Are you suggesting that one has to manually create databases on a live server even for wordpress?
Nothing has changed. WordPress has simplified the installation process a lot, but it still asks for your database name on the opening page of the installation. All it will do is build the database tables once you point t to the correct database.
There seems like a disconnect between your question’s intent and the answers you’re getting.
WP doesn’t “automatically create a database”. You either need to create one using the MySQL tools on your server (or through your host’s control panel/tool), or use the one-click install procedure from your host assuming there is one.
(BTW: Please do not use one-click installs; what you get is less than clean/standard)
I presume what you are actually asking, though, is how WP creates the 11 WP tables that a clean and new WP install includes? And the answer to that is that WP’s install procedure includes a script that runs the MySQL commands that make them (“create tablename”) using the prefix you specify (default is “wp_”)
Yes, thank you. I haven’t really used wordpress in a long time (if at all) and was under the impression that the databases were created automatically. I watched some of the tutorial videos on youtube and everything you and the others specify in your comments amounts to true. Thanks for your time.