If you follow my How to Manually Install WordPress Step by Step Tutorial and you complete all the steps up to Step 23 and for some reason the installer tells you that it can’t create a configuration file you can manually create one.
The following information will be based on cPanel web hosting along with screenshots.
It would be wise to try the tutorial mentioned above first because usually you do not have to manually create a wp-config.php file with cPanel hosting.
If for some reason that you do need to, or you just want to learn the steps involved hopefully this will help guide you.
This assumes you have performed all the steps prior to Step 23 in the How to Manually Install WordPress Step by Step Tutorial, which involves creating a database, database user, and database password. As well as uploaded the WordPress.zip file, extracted it, and you have moved all the files and folders to the public_html (main part) of your web space.
For this example we will be using the following database credentials from the previous tutorial.
- Database Name: telescop_wpress
- Database User: telescop_wpress
- Database password: bK.9)-75Zzh(-n5a1
Login to cPanel if you are not already and open the “File Manager”.
Find and click on wp-config-sample.php and choose “Edit” near the top of the page.
If you see a window like, this choose the “Edit” button.
Find the MySQL settings area within the file.
It looks like this:
Copy and paste your database name, database user, and database password into the appropriate locations as pictured here:
Scroll down a little more until you find the “Authentication Unique Keys and Salts area.”
Goto the following address to generate your unique authentication keys:
They are randomly generated and unique.
They look like this:
Copy and paste each unique key from the https://api.wordpress.org/secret-key/1.1/salt/ page into the wp-config-sample.php file in the appropriate location.
Do not refresh the page, and make sure you copy them all.
You need all the characters between the single quotes.
Click the “Save Changes” button and then the “Close” button:
Return to the cPanel File Manager if the “Close” button in the previous step didn’t do so.
Find and click on the “wp-config-sample.php” to highlight it.
Then, click on “Rename” near the top of the page.
Change it to wp-config.php and then click the “Rename File” button.
You are just removing the -sample part of the file name.
Now open a web browser tab or window and navigate to your website:
Privacy/Allow search engines to index this site
Be sure to write your Username and Password down so you don’t forget you will need them to login to the WordPress Admin Dashboard.
Click the “Install WordPress” button to continue.
If you followed these instructions you should see a Success! page.
You can click on the “Log in” button to go to the WordPress login page.
Enter your Username and Password you created in Step 10 to login to the WordPress Administration Dashboard.
If your host happens to use something other than localhost as the database host you may need to contact them and ask them what you need to use instead of the standard localhost.
Once you have that information you can find in the wp-config.php file the following line in the MySQL settings area:
/** MySQL hostname */
define (‘DB_HOST’, ‘localhost‘);
Then, change it to reflect the information they give you.
/** MySQL hostname */
define (‘DB_HOST’, ‘mysql.severname.com‘);
Be sure to see my full WordPress install tutorial, which also includes a step by step video here:
How to Manually Install WordPress Step by Step Tutorial