Creating a wp-config.php file for new WordPress installs involves two simple steps:
- Create a new database on your server
- Create the wp-config.php file
More often than not, you won’t need to tackle this because your host offers WordPress as a one-click install. If yours doesn’t, consider switching to one of the recommended WordPress hosts.
1. Create a new database on your server
A database is a special storage engine that lets you quickly access data using a special language called SQL. It is much faster than storing individual pieces of data in flat files would ever allow.
WordPress uses a database to store the contents of your blog, and we’ll need to create a database for your new site as a result. Your host will usually let you create a database from your hosting account’s control panel.
The location and specifics will vary from a control panel to the next, but the underlying concepts are the same, so we’ll stick to Dreamhost in what follows.
Start by spotting the MySQL database manager. It’s usually called either of “Databases” or “MySQL” or “MySQL databases”. In the Dreamhost control panel, it’s under Goodies / Manage MySQL.
Enter the database details as you see fit, note them down, and proceed.
2. Create the wp-config.php file
Start by renaming the wp-config-sample.php as wp-config.php. Or make a copy on your desktop, to avoid any errors during site upgrades.
Then, open the file with a plain text editor such as Notepad or UltraEdit.
Replace the field values in the file, save (mind leading and trailing spaces and line breaks), and you’re done.
How to use this file
You can now get back to the Semiologic Pro install instructions, with three tiny differences:
- Skip the first step (WordPress one-click install)
- Quite obviously, you’ll find an empty folder when you open an FTP session to your site
- You’ll want to upload the wp-config.php file in the same location as the Semiologic Pro files