Blog: From Database to Ready: Setting up a WordPress Project (More Posts)
Together we’ll be working on setting up an installation of WordPress from scratch. You will need…
- A Local Development Server (e.g. XAMPP for Windows)
- A MySQL Database provided by phpMyAdmin on your Local Development Server.
- A text editor. I like Visual Studio Code.
- The latest WordPress Download from WordPress.org.
Other examples for a local development server include MAMP, for Apple and DesktopServer. But I always use XAMPP for Windows which you can download, here. This site will use XAMPP, going forward.
Getting Started
With XAMPP, when installed it will make a htdocs directory on your C drive (Windows). First up, find a place in your system to develop PHP/Wordpress websites locally.
For me this is my htdocs directory using XAMPP as my local development server.
I then have a directory called “wordpress” where I put individual WordPress installations. It’s a home for all my WordPress projects whether I’m editing theme files or working with a local installation of WordPress.
Next, I download the latest version of WordPress from WordPress.org and unzip the package.
When I’m making a new installation of WordPress I tend to use the same name for the project root directory as the theme directory name.
for example…
wordpress_theme (root) -> wp-content/ -> themes -> wordpress_theme
The WordPress files should go into the project root directory. Once you’ve unzipped the download, copy them there.
- wp-admin (directory)
- wp-content (directory)
- wp-includes (directory)
- wp-config-sample.php and the rest of the root files.
Setting up the Database
Now we need to set up the database behind the scenes.
WordPress will set up most of the database fields and values but before that happens it needs to know which database to assign it to.
In your browser, go to http://localhost/phpmyadmin to enter phpMyAdmin
Look for the “Databases” tab in phpMyAdmin databases -> create database.
Enter a name for your database in the “Database Name” field (e.g. wordpress_db). You’ll find this by clicking the “Databases” Tab in phpMyAdmin.
User Accounts
The database has been created. It now needs a database username. Select the Add a User Account tab to create a new user.
User Accounts ===> Add user account
You are then presented with a number of input fields.
- User Name:
- Host name:
- Username password:
- Select all the global priveleges
User name: e.g. wordpress_user This will be your database user account – blog posts will use this user id
Host name: This will usually be “localhost” when working on local development, but when it comes to online, your web host will have one ready for you.
Choose a strong password for the database. You can either enter it twice or click “generate” to have phpMyAdmin create a password you.
Reminder: Whatever you do, keep a note of all this information in a safe place. You’ll need it when it comes to installing WordPress to your system.
Assign a database to a username in phpMyAdmin:
Click on a database you created from the left-hand vertical navigation. So in this example, you’d click the link that says wordpress_db.
Then, look for the “Privileges” tab and click on it.
Find the user you want to assign to a database and click the associated checkbox. I often find I’ve forgotten to do this when I’m selecting databases for WordPress. Make sure the checkbox remains ticked. You won’t need to save this action.
You should now be ready to generate the wp-config file. In your browser, go to the root of your project.
localhost/wordpress_theme
This URL will bring you to the Database Setup wizard. Using the details you created in phpMyAdmin, fill in the database credentials. Clicking “Let’s go!” will start the process.
- Enter the Database Name
- Enter the database username
- Enter the database host (Again, this will normally be localhost in local development)
- Table Prefix – You can usually ignore this unless you want to use multiple WordPress installations sharing the same database, for the same root directory.
If everything went well, you should get a message starting with “Alright sunshine…”. This indicates that a connection to the database was successful and you can now set up your WordPress login.
Set up your login credentials on WordPress
Site title – Don’t worry too much about what you write here, as it can be changed later on in the WordPress Customiser.
Username – Any posts you author will use this username, so choose carefully. As you are creating this installation for the first time, this username will automatically be gven Administrator credentials.
Email Address – The Administrator email address – Emails from WordPress, which include notices of database updates will go to this address.
Search Engine (Checkbox) – Again keep a good and secure place to store this information – for keeping this data secure. I like to use KeePass. It is password secured and is an easy-to-use database of login and password information.
With your information entered and a secure place to retrieve your login and password information, you should now be ready to login to your system and check it out.
localhost/wordpress_theme/wp-admin.
Enter the username and password you just created (and stored safely !) into the 2 input boxes. If successful you’ll see the WordPress dashboard.
And presto…
This website will discuss transferring data from one installation to another, e.g. your final production server. But if you’ve made it this far, you’re ready to start developing in WordPress. The next blog talks about setting up your files to work as a WordPress Theme.


