Sunday, 2 February 2014
How-to: Install Wordpress on Debian 7 Part 2
In Part 1, we started our Wordpress install by getting the Wordpress installable archive and setting our database permissions. In part 2, we complete our installation.
Choose Wordpress Location
I put my Wordpress installation into the /var/www/ folder, which is my server root. You my have other software running on your server and want to keep your root folder tidy, so instead of the root directory of your web server:
then a subdirectory of your web server;
The location of your root web directory in the file system on your web server can vary across hosting providers and operating systems. Make sure you know where this is.
If your server is a remote machine and you don't have direct login access, you will need to upload your files to your web server using an FTP client.
If you have shell access and the Wordpress files are already on the server, you still need to move all of the contents of the wordpress directory (but not the directory itself) into the relevant folder.
Run the Wordpress Install Script
Point a web browser at the installation script. If you placed the WordPress files in the root folder, run it with http://example.com/wp-admin/install.php, or in a sub-folder, for example, http://example.com/blog/wp-admin/install.php.
Setup Wordpress configuration file
The installer will look for a valid wp-config.php; if it can't find one, it will tell you and offer to try to create and edit the file itself, or you can fire up this yourself by loading wp-admin/setup-config.php in a web browser. You need to tell WordPress your database information so it can connect. WordPress will ask you the database details and write them to a new wp-config.php file. If this works, you can go ahead with the installation; otherwise, go back and create, edit, and upload the wp-config.php file yourself.
There are plenty of tutorials on-line for editing wp-config.php; you can start from scratch or re-use the wp-config-sample.php in your installed wordpress folder. Rename it to wp-config.php, and open it in a text editor.
Enter your database information under the section labeled
// ** MySQL settings - You can get this info from your web host ** //
The name of the database you created for WordPress - mine is wp_data .
The username you created for WordPress; mine is wp_user.
The password you chose for the WordPress username.
The hostname you for you server (usually, but not always 'localhost'. If a port, socket, or pipe is necessary, append a colon (:) and then the identifier to the hostname.
The database character set, normally should not be changed.
The database collation should normally be left blank.
Enter your secret key values under the section labeled
* Authentication Unique Keys.
Save the wp-config.php file.
Enabling SSL in WordPress is a whole other How-to which we won't do here.
The installer steps through a details screen. You enter your site title, a user name, your choice of a password (twice) and an e-mail address to enable notifications and password recoveries.
Note the check-box asking if you would like your blog to appear in search engines like Google and Technorati. Leave the box checked if you would like your blog to be visible to everyone, including search engines, and uncheck the box if you want to block search engines, but allow normal visitors.
And we're done.
Provided your webserver is running, php is installed and the MySQL has the right permissions set for your Wordpress to access it, you should have a working, empty Wordpress install ready for use. RC
Related: How-to: Install Wordpress on Debian 7 Part 1