Installing WordPress on a Gandi AI server

Installation time: 10-15 minutes

Prerequisites

On the usefulness of a mailserver

The WordPress installation ends by sending an email to the site administrator. This email contains the login to the WordPress admin pages and the associated password. So that WordPress can transmit this and future important messages about events occurring in your blog installation, you will need to install a mailserver before installing WordPress.

If you use Gandi AI, you need to install the mailserver module Postfix. (See the tutorial: mail-server-configuration )

Create a database for the blog

It would be prudent to have a database user and password dedicated to the blog, for security reasons. Let's be original and call this database blog.

If you don't yet know how to create a database, please see our tutorial: create-database.

Provide a dedicated space for the blog

Here, you have two options. For neatness' sake, blogs are usually placed in a directory within the www subdomain (www.example.com/blog), or in a specific subdomain (blog.example.com).

If you prefer to have your blog in a subdirectory:

Easy! Create a dedicated directory in htdocs/ such as blog/ (which will result in your blog being found at www.example.com/blog).

If you want assign a specific sub-domain to your blog like blog.example.com:

Two things to do:

  • Configure your server for this sub-domain, as explained in this tutorial
  • Configure your sub-doain to point to the server that you just configured, as explained here.

Downloading Wordpress

First, download the installation files. At the time of this writing, the most recent version of WordPress is version 2.5.

You can download the latest version at the official site: http://wordpress.org/download/

Once the file has been downloaded to your computer, unzip it. This will result in a directory on your desktop containing all the WordPress files; we'll rename something like blog.

Open your FTP client of choice (FileZilla, for example). Connect as admin to your AI server, and browse to the directory that corresponds to the virtual host you set up earlier.

For our example, the FTP path looks like this:

/srv/d_my-gandi-ai/www/blog.example.com/htdocs/

Now, we'll upload the files to our VPS.

  • If you want your blog to appear directly at the domain (e.g. blog.example.com) you should upload the content of the directory (and not the directory itself) into the htdocs/ directory.
  • If you want the blog to appear in a subdirectory such as example.com/blog then you simply need to upload the blog/ directory from your desktop (or whatever you called it) to your htdocs/ folder.

Installation of my WordPress blog

Installing WordPress is done through your FTP client.

First, find the wp-config-sample.php file found in your blog's path, and copy it as wp-config.php.

Then, open the file with your text editor of choice.

In our case, the code in wp-config.php will be completed as follows, according to the written instructions in green:

It should go without saying that you should not use the password in the screenshot for your own database.

There is a bug in version 2.6.1 that makes it necessary to save wp-config.php with ANSI encoding and not UTF-8. Otherwise you will receive the error ”…headers already sent by ..line12..” and will not be able to complete the installation.

Once you have edited the file, open your browser and navigate to the WordPress installation page, which is found at /wp-admin/install.php in the WordPress directory you chose.

You will be prompted for several pieces of information by the web-based installer (the name of your blog, email address, etc). Once you've done so, that's it!

You will be attributed the admin username and a password, which you can then change to one of your choice.

Congratulations, your WordPress blog is ready to be configured! If you need help configuring and personalizing your WP install, the official WordPress documentation is a good place to start.

上一次變更: 2016/05/31 10:22 (外部編輯)