====== Installing a WordPress blog on Gandi AI ====== WordPress is one of the most famous blog applications around. ===== Creating a dedicated database for your blog ===== It's wise to have a database dedicated to your blog. Let's go crazy, and call it "**blog**". If you don't (yet) know how to go about this, please read this [[en:hosting:gandi-ai:create-database|tutorial]]. ===== Creating a directory for your blog ===== You have a choice here. For "neatness'" sake, such applications are generally placed in a folder within the **www** sub-domain (%%www.example.com/blog%%) or in a specific sub-domain of its own (blog.example.com). ==== If you prefer to have your store in a folder ==== Easy! Just make sure the you create a specific folder for the store (as in %%www.example.com/blog%%) ==== If you prefer to have a sub-domain specifically dedicated to your store, such as blog.example.com ==== Two things to do: *Configure your server for this sub-domain, as explained in this [[en:hosting:gandi-ai:configure-virtualhosts|tutorial]]. *Configure your sub-domain to point to the server you have just configured, as explained in this [[en:hosting:manage-quota:attach-domain|tutorial]]. This is the option we will be using in the rest of the tutorial. ===== Fetching WordPress ===== To begin with, we need to download it. At the time of writing, the latest version was 2.3.2. Nothing beats the official site to get the intial compressed file. I therefore recommend [[http://wordpress.org/latest.zip|this link]]. Now that you've downloaded the file onto your favorite hard drive, decompress it. You now have a folder (let's rename it **blog**) containing all of the WordPress files. Launch your favorite FTP client (we recommend [[http://sourceforge.net/project/showfiles.php?group_id=21558&package_id=15149&release_id=568040|FileZilla]]) and log in as **admin** onto your server. Then, open the folder corresponding to the VirtualHost you had initially defined. In our example, the path of the FTP would therefore be: /srv/d_my-gandai-ai/www/blog.example.com/htdocs ...that is, unless you've changed the initial configuration of the web files. If that's the case, however, I'm assuming you knew what you were doing. :) At this stage, we can upload the blog files onto your server. * If you created a **blog.example.com** kind of virtual host, you will want the blog to come up as the front page (i.e. not within a folder in the sub-domain) and you should therefore **upload the content** of the **blog** folder into the **htdocs** folder of your sub-domain. * If you're not a fan of sub-domains and prefer a good old **example.com/blog**, then you need to **upload the complete folder** into **htdocs** (or another folder if you want). ===== Installing WordPress ===== Your blog's setup is done through your FTP Client. You need to find the file called **wp-config-sample.php** in your blog's directory, and rename the file as "**wp-config.php**". Then, open the file with Notepad or any other Plain Text editor - there are some excellent open source ones out there, such as [[http://downloads.sourceforge.net/notepad-plus/npp.4.7.5.bin.zip?modtime=1200342639&big_mirror=0|Notepad++]] which I will be using here. In our example, the code of the **wp-config.php** page would be completed as follows, following the indications marked in green: {{ en:hosting:using-linux:tutorials:gandiai:wordpress-config-edit-en.png }} **Of course, don't use the same password if you are reading but haven't created your own database yet!** Once you have adited the file and uploaded it back into WordPress' directory, open your web browser and launch the install page, whose directory is **/wp-admin/install.php** inside the WordPress folder. You'll just need to give some basic identification info (blog name and e-mail), submit, and you're done! You'll be granted the **admin** login, and an automatically generated password (which you can later modify if you wish). Congratulations, your WordPress blog is all set and ready to be blogged in! For further information on hwo to use WordPress, please visit the official [[http://codex.wordpress.org/Main_Page|WordPress documentation page]]. Enjoy! ----