In this tutorial I install WordPress, build a database in MySQL, and add users to the database and install WordPress.
Tools Used: Putty, Virtual Box, Ubuntu 12.04, and WinSCP (SFTP).
Navigate to our document root directory, which is where we download WordPress using wget.
Now we extract WordPress. You can use an FTP client to do this too, I used tar xzvf out of habit.
Log into MySQL and create the database for WordPress and add a user to it. I’d suggest taking notes of the username, password and title of the database you created, you will need it later. And trust me, you don’t want to forget that information, I know how much of a pain in the ass it is to start over again.
After you have given the user the right privileges, you need to implement the new changes.
Let’s exit out of MySQL, just use the ‘quit’ instruction to do so.
Now we need to work some baby making magic to get WordPress to work with our database. Simple enough, really. Navigate to the WordPress directory.
Now we need to make a copy of the wp-config-sample.php but rename the copy to wp-config.php (This is where a lot of inexperienced people get confused. Don’t believe me? Check Google).
Open the wp-config.php file and fill in the required information for the database, username and password. Remember the database and unpw that you created in MySQL? Let’s add it to the wp-config.php file so WordPress and MySQL can sync with each other. Also, I’d recommend going to this resource: http://api.wordpress.org/secret-key/1.1/salt and copying/adding those values to it too for security purposes.
We want our WordPress installation to be in the document root folder, not a subdirectory. If we left it where it’s at, you’ll have to type in http://www.yourwebsite.com/wordpress if you want to access the site. So let’s copy all the files over to our document root folder. You may need to change some file and folder permissions in order to do this, otherwise you’ll get permission denied messages.
Open your browser, navigate to your VM’s LAN IP address and if you did it right, you’ll get greeted by a WordPress installation screen. It’s pretty straight forward, just fill it out and click install WordPress.
And that’s it, you’re finished. Pretty easy, right? With CPanel, and Shared Hosting in general, they have a tool called Fantastico and something else, I forget what it’s called. But anyway, with those tools, they automate the entire process for you.
I plan on continuing this series by writing a couple of tutorials about Nginx, Reverse Proxy to Apache, and Joomla. If you have any questions, I overlooked something, or whatever the case may be, feel free to leave feedback and I’ll try my best to help out.