Installing WordPress 3.0 on Ubuntu 10.04 (Lucid Lynx)

Sponsored Link
On this post I’ll tell you how to install the latest WordPress version (3.0) on a Ubuntu 10.04 (Lucid Lynx) machine. I personally love WordPress as a blogging engine and hope you find these instructions helpful and that make you create your blogs fast and pragmatically.

So, without further ado, let’s start by opening a terminal and type:


miguel@c31828:~$ sudo aptitude install apache2
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reading extended state information
Initializing package states… Done
The following NEW packages will be installed:
apache2 apache2-mpm-worker{a} apache2-utils{a} apache2.2-bin{a} apache2.2-common{a}
libaprutil1-dbd-sqlite3{a} libaprutil1-ldap{a}
0 packages upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,238kB of archives. After unpacking 10.7MB will be used.
Do you want to continue? [Y/n/?]

Continue with Y. You’ll notice by the end of the update that Apache will be started and have a default configuration set up:

(…)


Enabling module authn_file.
Enabling module authz_host.
Enabling module reqtimeout.


Setting up apache2-mpm-worker (2.2.14-5ubuntu8) ...
* Starting web server apache2                                                                           apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]


Setting up apache2 (2.2.14-5ubuntu8) ...


Reading package lists... Done

(…)

Once the installation is finished, we can test if Apache is working OK by opening up a browser and navigate to the URL http://127.0.0.1. If everything is OK you’ll see the “it works!” web page, meaning Apache is up and running!

Next, we’ll need to install MySQL 5.1:

miguel@c31828:~$ sudo aptitude install mysql-server-5.1
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reading extended state information
Initializing package states… Done
The following NEW packages will be installed:
libdbd-mysql-perl{a} libdbi-perl{a} libhtml-template-perl{a} libmysqlclient16{a}
libnet-daemon-perl{a} libplrpc-perl{a} mysql-client-5.1{a} mysql-client-core-5.1{a}
mysql-common{a} mysql-server-5.1 mysql-server-core-5.1{a}
0 packages upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.2MB of archives. After unpacking 60.7MB will be used.
Do you want to continue? [Y/n/?]

Continue with Y. During the installation we’ll need to insert a root password for MySQL. You can pick a strong password from strongpasswordgenerator.com. For obvious reasons, save this password in a safe place!

As you can see from the list above, MySQL 5.1 packages occupy 24.2 MB and this download can take some time depending on the Internet connection and CPU speed.

Next, we’ll install PHP version 5:


miguel@c31828:~$ sudo aptitude install php5 phpmyadmin
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reading extended state information
Initializing package states… Done
The following NEW packages will be installed:
apache2-mpm-prefork{a} dbconfig-common{a} javascript-common{a} libapache2-mod-php5{a}
libjs-mootools{a} libmcrypt4{a} libt1-5{a} php5 php5-common{a} php5-gd{a} php5-mcrypt{a}
php5-mysql{a} phpmyadmin wwwconfig-common{a}
The following packages will be REMOVED:
apache2-mpm-worker{a}
0 packages upgraded, 14 newly installed, 1 to remove and 0 not upgraded.
Need to get 10.1MB of archives. After unpacking 32.7MB will be used.
Do you want to continue? [Y/n/?]

Continue with Y. I also installed phpMyAdmin, although optional, because I like to create the database, users, tables, etc. through this great package and this way I don’t need to give any commands directly on the mysql prompt (I personally tend to forget a lot on the right syntax on long commands).

If you don’t want to install phpMyAdmin, don’t forget to include php5-mysql on the command above (sudo aptitude install php5 php5-mysql).

You’ll notice that during phpMyAdmin installation you’ll have to choose the web server that should be configured to run phpMyAdmin: apache2 or lighttpd. Choose apache2 (with the space key) and hit Ok (with the tab and then the space key) to continue the installation. You’ll then get a screen telling you if you want to configure database for phpMyAdmin with dbconfig-common. Hit No (with tab and then the space key).

After phpMyAdmin installation, you can again open the browser and hit URL http://127.0.0.1/phpmyadmin/. Et voilà! You can now get inside your MySQL database world through your browser using the user root and the password chosen above (but be aware that user root has full access to your databases and should be used wisely).

Now, we only need to download WordPress 3.0 from the official WordPress web page:

http://wordpress.org/latest.zip (2.2MB) or http://wordpress.org/latest.tar.gz (2.0MB)

Right click on one of these links and download it to a location of your preference (for example, ~/Desktop) using the option "Save Link As...". Unpack this package (I’ll use here folder /var/www as it is a standard location where the web server will look for web pages) using unzip (for the .zip archive) or tar (for the .tar.gz archive).


miguel@c31828:~/Desktop$ sudo mv latest.zip /var/www

or

miguel@c31828:~/Desktop$ sudo mv wordpress-3.0.1.tar.gz /var/www


miguel@c31828:~/Desktop$ cd /var/www


miguel@c31828:/var/www$ sudo unzip latest.zip

or

miguel@c31828:/var/www$ sudo tar -zxvf latest.tar.gz

After unpacking, you’ll get a folder wordPress extracted to your chosen location:


miguel@c31828:/var/www$ ls -al
total 2912
drwxr-xr-x  3 root   root      4096 2010-06-30 18:00 .
drwxr-xr-x 17 root   root      4096 2010-06-30 16:32 ..
-rw-r–r–  1 root   root       177 2010-06-30 16:32 index.html
drwxr-xr-x  5 root   root      4096 2010-06-17 17:05 wordpress
-rw-r–r–  1 miguel miguel 2964966 2010-06-30 17:38 latest.zip

One of the important things to do is to give the right permissions for your user to read and write into the wordpress folder. For this, you will want to give the correct ownership to your local user (in my case, user miguel):

miguel@c31828:/var/www$ sudo chown -R miguel:users wordpress

As you can see, the wordpress folder now has the right permissions for my user to change it:

miguel@c31828:/var/www$ ls -al
total 2912
drwxr-xr-x 3 root root 4096 2010-06-30 18:00 .
drwxr-xr-x 17 root root 4096 2010-06-30 16:32 ..
-rw-r–r– 1 root root 177 2010-06-30 16:32 index.html
drwxr-xr-x 5 miguel users 4096 2010-06-17 17:05 wordpress
-rw-r–r– 1 miguel miguel 2964966 2010-06-30 17:38 latest.zip

You can now delete the .zip or .tar.gz archive:


miguel@c31828:/var/www$ sudo rm -f latest.zip

or

miguel@c31828:/var/www$ sudo rm -f wordpress-3.0.1.tar.gz

Now all we’re missing is creating a MySQL database and configure WordPress!

For creating a database using phpMyAdmin, follow these steps:

  • Start by choosing a name for your WordPress database (like ‘wordpress‘ or ‘blog‘), enter it in the Create new database field, and click Create (choose the right Connection Collation for you or use utf8_general_ci).
  • Click the Home icon in the upper left to return to the main page, then click Privileges. If a user relating to WordPress does not already exist in the list of users, create one:
  • Click Add a new User.
  • Chose a username for WordPress (like ‘wordpress‘) and enter it in the User name field. (Be sure Use text field: is selected from the dropdown.)
  • Choose a strong password password (use strongpasswordgenerator.com), and enter it in the Password field. (Be sure Use text field: is selected from the dropdown.) Re-enter the password in the Re-type field.
  • Write down the username and password you chose.
  • Leave all options under Global privileges at their defaults.
  • Click Go.
  • Return to the Privileges screen and click the Edit privileges icon (on the right-most column) on the user you’ve just created for WordPress. In the Database-specific privileges section, select the database you’ve just created for WordPress under the Add privileges to the following database drop down. The page will refresh with privileges for that database. Click Check All to select all privileges, and click Go.
  • On the resulting page, make note of the host name listed after Server: at the top of the page. (This will usually be localhost.)

For creating a database using MySQL client, follow these steps:

miguel@c31828:/var/www$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 61
Server version: 5.1.41-3ubuntu12.3 (Ubuntu)


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> CREATE DATABASE databasename;
Query OK, 1 row affected (0.00 sec)


mysql> CREATE USER wordpressuser;
Query OK, 0 rows affected (0.00 sec)


mysql> SET PASSWORD FOR wordpressuser = PASSWORD(”wordpresspassword“);
Query OK, 0 rows affected (0.00 sec)


mysql> GRANT ALL PRIVILEGES ON databasename.* TO “wordpressuser“@”localhost” IDENTIFIED BY “wordpresspassword“;
Query OK, 0 rows affected (0.00 sec)


mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)


mysql> EXIT


Bye

Now all we have to do is to configure WordPress!


miguel@c31828:~$ cd /var/www/wordpress
miguel@c31828:/var/www/wordpress$ sudo cp wp-config-sample.php wp-config.php

Edit this new file, wp-config.php, with your favorite editor (I used emacs!) and change the values under the section labeled MySQL settings

  • DB_NAME: Database Name used by WordPress
  • DB_USER: Username used to access Database
  • DB_PASSWORD: Password used by Username to access Database
  • DB_HOST: The hostname of your Database Server

And also put your Authentication Unique Keys and Salts under the section labeled Authentication Unique Keys using WordPress’ online generator to obtain them:

  • AUTH_KEY
  • SECURE_AUTH_KEY
  • LOGGED_IN_KEY
  • NONCE_KEY

Save all your changes to file /var/www/wordpress/wp-config.php and open a browser and give it the URL http://127.0.0.1/wordpress/. If everything is OK by now you should see the WordPress welcome and configuration page (if you got the error "Error establishing a connection" that probably means something is wrong with the username or password you have saved in file wp-config.php):

WordPress Configuration Page

All we need now is to put some more few details like the site’s title, the user name and password we’ll use to login (once again I suggest using a strong password from the strong password generator site, and after everything is just the way we want just click the “Install WordPress” button!
If everything went perfect, a “Success!” web page follows and we can start using WordPress by logging in with the user name and password chosen on the previous step.

After you logged in, you will be redirected to the Dashboard page under which you can customize your wordpress blog to suit more easily your looks and purposes.

To install a new theme, hit the "Appearance" menu and then the "Install Theme" tab. Under the search field enter a theme search term by keyword, author, or tag. For instance, I chose "clean". One of the search results gave me the Fusion theme. Hit the Install link and then the Install now link at the preview window. At the Connection Information wordrepss page you will need to enter the following information: your hostname, FTP username and password and connection type. For this to work, you will first need to have a FTP daemon running on your web server. If you don't have it already, you can install one by using the command

sudo aptitude install vsftpd

After the installation, you will just have to edit the file /etc/vsftpd.conf as root using your favorite editor and enable the features you would like your ftp daemon to be enabled. I enabled the following ones (read the FTP daemon's documentation first if you're not sure of which options to enable and the security impact those changes will have):

anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES

Now all I have to do is to run the FTP daemon with the command:

sudo service vsftpd start

Let's now return at the "Connection Information" configuration page. Fill the necessary information in the text fields for your hostname (I used 127.0.0.1 but you can also use localhost), the user name (I used miguel) and the password (I won't tell you this one!). Choose FTP protocol and hit Install. If everything is OK, you should now see that your theme is being downloaded and installed in wordpress/wp-content/themes folder. Hit the "Preview" link to preview what your page will look like with the new theme, hit "Activate" link to use the newly installed theme or hit "Return to Theme Installer" page to install another theme!

Have fun using WordPress!

References: WordPress’ Installing WordPress -- Detailed instructions web page.

Sponsored Link

You may also like...

93 Responses

  1. classer says:

    Ok so after doing an ls in /etc/apache2/conf.d/ I could not find the phpmyadmin.conf file.

    Also, yes the installation of all parts went well. No errors came up during it.

    What should I do now?

  2. That’s strange. I removed my phpmyadmin package and then reinstalled to check if all the files went to the right places 🙂 And they did. Checkout what I did:

    miguel@c31828:/etc/apache2/conf.d$ sudo aptitude search phpmyadmin
    [sudo] password for miguel:
    i phpmyadmin – MySQL web administration tool
    miguel@c31828:/etc/apache2/conf.d$ sudo aptitude remove phpmyadmin –purge
    The following packages will be REMOVED:
    dbconfig-common{pu} javascript-common{pu} libjs-mootools{pu} libmcrypt4{pu} php5-gd{pu} php5-mcrypt{pu} php5-mysql{pu}
    phpmyadmin wwwconfig-common{pu}
    0 packages upgraded, 0 newly installed, 9 to remove and 4 not upgraded.
    Need to get 0B of archives. After unpacking 21.8MB will be freed.
    Do you want to continue? [Y/n/?] Y
    (Reading database … 410475 files and directories currently installed.)
    Removing phpmyadmin …
    * Reloading web server config apache2 [ OK ]
    Processing triggers for man-db …
    Processing triggers for doc-base …
    Processing 1 removed doc-base file(s)…
    Registering documents with scrollkeeper…
    (Reading database … 409555 files and directories currently installed.)
    Removing dbconfig-common …
    Purging configuration files for dbconfig-common …
    dpkg: warning: while removing dbconfig-common, directory ‘/etc/dbconfig-common’ not empty so not removed.
    Removing javascript-common …
    Purging configuration files for javascript-common …
    Removing libjs-mootools …
    Removing php5-mcrypt …
    Purging configuration files for php5-mcrypt …
    Removing libmcrypt4 …
    Purging configuration files for libmcrypt4 …
    Removing php5-gd …
    Purging configuration files for php5-gd …
    Removing php5-mysql …
    Purging configuration files for php5-mysql …
    Removing wwwconfig-common …
    Processing triggers for man-db …
    Processing triggers for libapache2-mod-php5 …
    * Reloading web server config apache2 [ OK ]
    Processing triggers for libc-bin …
    ldconfig deferred processing now taking place

    miguel@c31828:/etc/apache2/conf.d$ ls
    charset localized-error-pages other-vhosts-access-log security

    miguel@c31828:/etc/apache2/conf.d$ ls /usr/share/phpmyadmin
    ls: cannot access /usr/share/phpmyadmin: No such file or directory
    miguel@c31828:/etc/apache2/conf.d$ sudo aptitude install phpmyadmin
    The following NEW packages will be installed:
    dbconfig-common{a} javascript-common{a} libjs-mootools{a} libmcrypt4{a} php5-gd{a} php5-mcrypt{a} php5-mysql{a} phpmyadmin
    wwwconfig-common{a}
    0 packages upgraded, 9 newly installed, 0 to remove and 4 not upgraded.
    Need to get 5,312kB of archives. After unpacking 21.8MB will be used.
    Do you want to continue? [Y/n/?] Y
    Get:1 http://archive.ubuntu.com/ubuntu/ maverick/main dbconfig-common all 1.8.46 [474kB]
    Get:2 http://archive.ubuntu.com/ubuntu/ maverick/universe wwwconfig-common all 0.2.1 [22.8kB]
    Get:3 http://archive.ubuntu.com/ubuntu/ maverick/universe javascript-common all 7 [3,854B]
    Get:4 http://archive.ubuntu.com/ubuntu/ maverick/universe libjs-mootools all 1.2.4.0~debian1-1 [248kB]
    Get:5 http://archive.ubuntu.com/ubuntu/ maverick/universe libmcrypt4 amd64 2.5.8-3.1 [87.6kB]
    Get:6 http://archive.ubuntu.com/ubuntu/ maverick-updates/main php5-gd amd64 5.3.3-1ubuntu9.3 [38.5kB]
    Get:7 http://archive.ubuntu.com/ubuntu/ maverick/universe php5-mcrypt amd64 5.3.3-0ubuntu2 [18.6kB]
    Get:8 http://archive.ubuntu.com/ubuntu/ maverick-updates/main php5-mysql amd64 5.3.3-1ubuntu9.3 [75.4kB]
    Get:9 http://archive.ubuntu.com/ubuntu/ maverick-updates/universe phpmyadmin all 4:3.3.7-3build0.10.10.1 [4,342kB]
    Fetched 5,312kB in 1min 5s (81.7kB/s)
    Preconfiguring packages …
    Selecting previously deselected package dbconfig-common.
    (Reading database … 409231 files and directories currently installed.)
    Unpacking dbconfig-common (from …/dbconfig-common_1.8.46_all.deb) …
    Selecting previously deselected package wwwconfig-common.
    Unpacking wwwconfig-common (from …/wwwconfig-common_0.2.1_all.deb) …
    Selecting previously deselected package javascript-common.
    Unpacking javascript-common (from …/javascript-common_7_all.deb) …
    Selecting previously deselected package libjs-mootools.
    Unpacking libjs-mootools (from …/libjs-mootools_1.2.4.0~debian1-1_all.deb) …
    Selecting previously deselected package libmcrypt4.
    Unpacking libmcrypt4 (from …/libmcrypt4_2.5.8-3.1_amd64.deb) …
    Selecting previously deselected package php5-gd.
    Unpacking php5-gd (from …/php5-gd_5.3.3-1ubuntu9.3_amd64.deb) …
    Selecting previously deselected package php5-mcrypt.
    Unpacking php5-mcrypt (from …/php5-mcrypt_5.3.3-0ubuntu2_amd64.deb) …
    Selecting previously deselected package php5-mysql.
    Unpacking php5-mysql (from …/php5-mysql_5.3.3-1ubuntu9.3_amd64.deb) …
    Selecting previously deselected package phpmyadmin.
    Unpacking phpmyadmin (from …/phpmyadmin_4%3a3.3.7-3build0.10.10.1_all.deb) …
    Processing triggers for man-db …
    Processing triggers for libapache2-mod-php5 …
    * Reloading web server config apache2 [ OK ]
    Processing triggers for doc-base …
    Processing 1 added doc-base file(s)…
    Registering documents with scrollkeeper…
    Setting up dbconfig-common (1.8.46) …

    Creating config file /etc/dbconfig-common/config with new version
    Setting up wwwconfig-common (0.2.1) …
    Setting up javascript-common (7) …
    Setting up libjs-mootools (1.2.4.0~debian1-1) …
    Setting up libmcrypt4 (2.5.8-3.1) …
    Setting up php5-gd (5.3.3-1ubuntu9.3) …
    Setting up php5-mcrypt (5.3.3-0ubuntu2) …
    Setting up php5-mysql (5.3.3-1ubuntu9.3) …
    Setting up phpmyadmin (4:3.3.7-3build0.10.10.1) …
    dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
    Replacing config file /etc/phpmyadmin/config-db.php with new version
    * Reloading web server config apache2 [ OK ]
    Processing triggers for libc-bin …
    ldconfig deferred processing now taking place

    After the installation, going to http://127.0.0.1/phpmyadmin works perfectly.

    Can you do a re-installation and see if you get everything correctly installed? Post your results if you have any problems.

    Regards

  3. classer says:

    Hi Miguel,

    I did everything you did and still it doesn’t work. One of the results that appears different in my read out is this line:

    * Reloading web server config apache2
    apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName [ OK ]

    Also I see that I have 10 new packages installed rather than your 9.

    Ok I will post the full read out of my removing and re-installation of phpmyadmin here (by the way I am running 10.04):

    classer@classer-laptop:~$ sudo aptitude search phpmyadmin
    i phpmyadmin – MySQL web administration tool
    classer@classer-laptop:~$ cd /etc/apache2/conf.d/
    classer@classer-laptop:/etc/apache2/conf.d$ ls
    charset javascript-common.conf localized-error-pages security
    classer@classer-laptop:/etc/apache2/conf.d$ sudo aptitude remove phpmyadmin –purge
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done
    The following packages will be REMOVED:
    dbconfig-common{pu} javascript-common{pu} libjs-mootools{pu}
    libmcrypt4{pu} libt1-5{pu} php5-gd{pu} php5-mcrypt{pu} php5-mysql{pu}
    phpmyadmin wwwconfig-common{pu}
    0 packages upgraded, 0 newly installed, 10 to remove and 0 not upgraded.
    Need to get 0B of archives. After unpacking 21.9MB will be freed.
    Do you want to continue? [Y/n/?] y
    Writing extended state information… Done
    (Reading database … 296705 files and directories currently installed.)
    Removing phpmyadmin …
    Processing triggers for man-db …
    Processing triggers for doc-base …
    Processing 1 removed doc-base file(s)…
    Registering documents with scrollkeeper…
    (Reading database … 295806 files and directories currently installed.)
    Removing dbconfig-common …
    Purging configuration files for dbconfig-common …
    dpkg: warning: while removing dbconfig-common, directory ‘/etc/dbconfig-common’ not empty so not removed.
    Removing javascript-common …
    Purging configuration files for javascript-common …
    Removing libjs-mootools …
    Removing php5-mcrypt …
    Purging configuration files for php5-mcrypt …
    Removing libmcrypt4 …
    Purging configuration files for libmcrypt4 …
    Removing php5-gd …
    Purging configuration files for php5-gd …
    Removing libt1-5 …
    Purging configuration files for libt1-5 …
    Removing php5-mysql …
    Purging configuration files for php5-mysql …
    Removing wwwconfig-common …
    Processing triggers for man-db …
    Processing triggers for libapache2-mod-php5 …
    * Reloading web server config apache2 apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
    [ OK ]
    Processing triggers for libc-bin …
    ldconfig deferred processing now taking place
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done
    Writing extended state information… Done

    classer@classer-laptop:/etc/apache2/conf.d$ ls
    charset localized-error-pages security
    classer@classer-laptop:/etc/apache2/conf.d$ ls /usr/share/phpmyadmin
    ls: cannot access /usr/share/phpmyadmin: No such file or directory
    classer@classer-laptop:/etc/apache2/conf.d$ sudo aptitude install phpmyadmin
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done
    The following NEW packages will be installed:
    dbconfig-common{a} javascript-common{a} libjs-mootools{a}
    libmcrypt4{a} libt1-5{a} php5-gd{a} php5-mcrypt{a} php5-mysql{a}
    phpmyadmin wwwconfig-common{a}
    0 packages upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0B/5,422kB of archives. After unpacking 21.9MB will be used.
    Do you want to continue? [Y/n/?] Y
    Writing extended state information… Done
    Preconfiguring packages …
    Selecting previously deselected package dbconfig-common.
    (Reading database … 295469 files and directories currently installed.)
    Unpacking dbconfig-common (from …/dbconfig-common_1.8.44ubuntu1_all.deb) …
    Selecting previously deselected package wwwconfig-common.
    Unpacking wwwconfig-common (from …/wwwconfig-common_0.2.1_all.deb) …
    Selecting previously deselected package javascript-common.
    Unpacking javascript-common (from …/javascript-common_7_all.deb) …
    Selecting previously deselected package libjs-mootools.
    Unpacking libjs-mootools (from …/libjs-mootools_1.2.4.0~debian1-1_all.deb) …
    Selecting previously deselected package libmcrypt4.
    Unpacking libmcrypt4 (from …/libmcrypt4_2.5.8-3.1_amd64.deb) …
    Selecting previously deselected package libt1-5.
    Unpacking libt1-5 (from …/libt1-5_5.1.2-3build1_amd64.deb) …
    Selecting previously deselected package php5-gd.
    Unpacking php5-gd (from …/php5-gd_5.3.2-1ubuntu4.7_amd64.deb) …
    Selecting previously deselected package php5-mcrypt.
    Unpacking php5-mcrypt (from …/php5-mcrypt_5.3.2-0ubuntu1_amd64.deb) …
    Selecting previously deselected package php5-mysql.
    Unpacking php5-mysql (from …/php5-mysql_5.3.2-1ubuntu4.7_amd64.deb) …
    Selecting previously deselected package phpmyadmin.
    Unpacking phpmyadmin (from …/phpmyadmin_4%3a3.3.2-1_all.deb) …
    Processing triggers for man-db …
    Processing triggers for libapache2-mod-php5 …
    * Reloading web server config apache2 apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
    [ OK ]
    Processing triggers for doc-base …
    Processing 1 added doc-base file(s)…
    Registering documents with scrollkeeper…
    Setting up dbconfig-common (1.8.44ubuntu1) …

    Creating config file /etc/dbconfig-common/config with new version

    Setting up wwwconfig-common (0.2.1) …
    Setting up javascript-common (7) …

    Setting up libjs-mootools (1.2.4.0~debian1-1) …
    Setting up libmcrypt4 (2.5.8-3.1) …

    Setting up libt1-5 (5.1.2-3build1) …

    Setting up php5-gd (5.3.2-1ubuntu4.7) …
    Setting up php5-mcrypt (5.3.2-0ubuntu1) …
    Setting up php5-mysql (5.3.2-1ubuntu4.7) …
    Setting up phpmyadmin (4:3.3.2-1) …
    dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
    Replacing config file /etc/phpmyadmin/config-db.php with new version

    Processing triggers for libc-bin …
    ldconfig deferred processing now taking place
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done
    Writing extended state information… Done

    classer@classer-laptop:/etc/apache2/conf.d$

  4. classer says:

    I should also mention that I first installed all the packages with apt-get instead of aptitude. I don’t know if that did anything bad. When I saw that phpmyadmin did not work the first time, I uninstalled everything with “sudo apt-get remove package_name”.

    Then I reinstalled everything again with aptitude. When reinstalling mysql-server-5.1 and php5 phpmyadmin I was not stopped during the installation to pick a password and choose a server respectively. So I assume this means that these preferences (which were saved in a config file somewhere) were not deleted during the apt-get removing process.

    I read that apt-get does not remove all dependencies that are simultaneously installed with the main package. Perhaps this had something to do with it.

  5. classer says:

    Ok. Finally I installed WordPress locally successfully!

    I first uninstalled all the packages by doing “sudo aptitude purge package-name” just to be sure.

    Then I reinstalled everything with “sudo aptitude install package-name” and during the reinstall process I realize what my original mistake was. I had forgotten to press the spacebar when choosing what server phpmyadmin would run under. I did not read carefully enough and assumed the fact that ‘apache2’ was highlighted red meant that was the selected one.

    Anyways, once I got into http://127.0.0.1/phpmyadmin/ I realized that I did not have a username and password so I could not follow along with setting up a database that way. I ended up using the MYSQL client in the terminal which worked out fine.

    Now my issue is getting the FTP set up right. It keeps saying I have the wrong username/password for the username that I enter. It makes no sense because when during this entire tutorial set up the FTP username and password. This part of the tutorial is missing.

    Am I missing something?

  6. jigar jani says:

    Hi I have wordpress installed now , thanks to this great guide.

    Can I download the blog which I made before installing wordpress on my machine, to my local wordpress folder and update it regularly.

    How do I do that?

    Thanks again.

  7. @classer Are you using vsftpd or another ftp daemon? Can you post your vsftpd.conf file? Use Lodgeit (http://paste.pocoo.org/) if you have to paste the conf file and post the link for me to check it.

    @jigar I guess you can do that with no problem, although I have never done it. One great source of information about wordpress you check is IRC. Go to #wordpress on FreeNode server and fire up your questions there! I always use this great source of information when I have questions on a particular issue on software tools or development. By the way, my username is setner. Whenever I can I’m on FreeNode 🙂

    Best regards!

  8. gideon says:

    hi
    great guide
    I installed it succesfully, I installed VSFTP as well
    I wanted to uninstall a plugin so it want to connect to the server with ftp, but it needs a password and user. I tried both my WP access, admin and password and the Database wpgideon and password, neither of them works?

    any suggestions where I went wrong

  9. Hi gideon,

    What is the exact error you get when try uninstall a plugin? Check /var/log/apache2/error.log and /var/log/apache2/access.log when the error pops up. Also, I quickly searched serverfault and found this (hope it helps):

    http://serverfault.com/questions/251383/setting-up-ftp-users-on-linux

    Regards

  10. visitor says:

    Worked beautifully!
    very much obliged!
    thanks

  11. Jaki Levy says:

    These are great WordPress resources – I actually just started digging into a really really solid book on WordPress 3.0. It’s got some really nice code samples, and is written by a few pro WordPress developers (including some from Envato). I’m actually giving away 2 copies of the e-book on my site – check out the details about the e-book and the giveaway here – I think you’ll dig it : http://bit.ly/lq20Ff

  12. Tan Wei Song Beck says:

    Hi, thank you for the guide in installing my WordPress 3.1.2 in ubuntu 10.04.1. I am not sure whether any of you guys actually encountered the same problem with me but I just want to share.

    During the point where you need to enter the connection information. If you are unable to install using localhost, then change to use 127.0.0.1 because for me, I am unable to set the host as ‘localhost’. Hope it helps.

  13. Ken says:

    Tan Wei Song Beck is correct. I found out, also, that you may have to use 127.0.0.1 as your hostname instead of localhost.

    I am having a problem with installing themes, also. The problem is that WordPress cannot create the directories/files it needs to create to install the themes. I am fairly certain that my directory privileges are correct, and I know I have vsftpd running, and that the configuration is set up as they are in the tutorial. Let me go step by step in what I am doing:

    1. I go to “Install Themes” and choose WPFolio 1.72″.

    2. I enter in hostname 127.0.0.1, username (my username), password (my password), connection type “FTP” and I click proceed.

    3. WP begins to attempt to download and create the files needed for the installation, but it says it cannot create the files/directories needed. Example output:

    Installing Theme: WPFolio 1.72

    Downloading install package from http://wordpress.org/extend/themes/download/wpfolio.1.72.zip…

    Unpacking the package…

    Could not create directory. /var/www/wordpress/wp-content/upgrade/wpfolio.tmp

    As a test of my file permissions, I manually created the /var/www/wordpress/wp-content/upgrade directory already, since WP had failed to create this directory. No problem there.

    I’ve granted my user and group recursive ownership of this directory, as the tutorial says to do. I’m not sure what the problem is.

  14. Ken says:

    Nevermind. Problem solved. I’d forgotten to make some changes and save my changes in /etc/vsftp.conf

  15. Roberto says:

    Hi Miguel, great tutorial, is really easy to follow. the issue I have is the username & password for the ftp. Is the same username and password hte same as for the one used for entering wordpress? I’m using vsftpd.confi This is the link: http://paste.pocoo.org/show/424417/
    hope you have time to help. Thanks in advance.

  16. Hi Roberto,

    This is my vsftpd.conf I actually use:

    http://paste.pocoo.org/show/438432/

    Yes, I use the same user for entering wordpress and to use ftp.

    Hope this helps! Regards,

    Miguel Rentes

  17. kahoots says:

    If you want image resizing to work then you need to also install php5-gd.

    sudo apt-get install php5-gd

  18. zona ubuntu says:

    Great! very useful post, it would be awesome to install wordpress from a PPA.

  19. Euloiix says:

    Thanks ! Many thanks

  20. gideons bible says:

    I have to use my default computer username and password. IDK if thats what you guys were missing (or how to make it something different if thats possible)…. I’m still stuck on creating the directory though.

  21. mEME says:

    why would i set it up on a server at my local pc???

    The server is on a SERVER!! remote!!

    How on earth can i USE 127.0.0.1 ?????????????

    pLEASE SAY HOW TO SET IT UP ON A server!!!!

  22. Shaun says:

    I followed the directions and everything went fine. I began creating the site and have all of my content filled. I thought it would be easy to change my host name from 127.0.0.1 since I saw it in the WP settings, but I have wasted a lot of time trying to do this last step.

    The site is hosted on an internal network. I would like to change it to http://name or http://10.10.10.81 I tried many methods suggested here http://codex.wordpress.org/Changing_The_Site_URL

    If I change the name within WP settings it kicks me out when I click save and I can not get to the username/password (wp-login.php) screen again. Right now to edit my site I use http://127.0.0.1/wordpress/wp-login.php After I change anything it does not load. http://name/wordpress/wp-login.php or http://10.10.10.81/wordpress/wp-login.php or many other variations of the hostname or 10.10.10.81 either do not load the login page or it does a google search. I tried: edit wp-config.php, edit functions.php, change URL directly in the database with phpMyAdmin. Relocate didn’t seem to work for me. Going to the new hostname or ip does not load the user end of the site.

    If I can get the hostname changed and log in to wordpress I can take care of fixing all of my media and image links on my own.

  23. bloblo says:

    The requested URL /wordpress was not found on this server.

  24. bloblo says:

    The problem is all this “localhost” and 127.0.0.1 stuff.

    We are not installing it on a home server, We-re installing it on a dedi, with it-s own ip address.

    PLEASE make it clear when “localhost” is referred to and 1276.0.0.1 is reffered to what should be changed for a remote server

  25. bloblo says:

    The requested URL /wp-admin/install.php was not found on this server.

  26. Tsvetelina says:

    Thank you! Thank you! I had troubles setting wordpress to work I got the error: undefined method get_header(). I was originally working with lampp then I moved to windows and then after I had to reinstall ubunutu(nothing to do with wordpress or lampp) I left lampp and follow your tutorial. Thank you soooo much! : )

  27. Karen D. says:

    I am still running Ubuntu 10.04 (by choice) and installing WordPress locally is going to save me SO much time. I followed your instructions step by step and everything is working fine. Thank you ever so much for the time and effort and sharing of this information!

  28. Miguel Rentes says:

    I’m glad I could help you 🙂

    Best regards

  29. Miguel Rentes says:

    You’re welcome. I’m happy I could help you.

    Best regards

  30. Miguel Rentes says:

    Do you still have this problem? Or have you solved it already?

Leave a Reply

Your email address will not be published. Required fields are marked *