July 2, 2010 · General · Email This Post

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

Incoming search terms:

Related posts

93 Comments to “Installing WordPress 3.0 on Ubuntu 10.04 (Lucid Lynx)”

  1. Hi Ray,

    You’re missing the Directory tags (was it on purpose?). Nevertheless, my apache.conf is this one:

    # phpMyAdmin default Apache configuration

    Alias /phpmyadmin /usr/share/phpmyadmin

    Options FollowSymLinks
    DirectoryIndex index.php

    AddType application/x-httpd-php .php

    php_flag magic_quotes_gpc Off
    php_flag track_vars On
    php_flag register_globals Off
    php_value include_path .

    # Authorize for setup

    AuthType Basic
    AuthName “phpMyAdmin Setup”
    AuthUserFile /etc/phpmyadmin/htpasswd.setup

    Require valid-user

    # Disallow web access to directories that don’t need it

    Order Deny,Allow
    Deny from All

    Order Deny,Allow
    Deny from All

    Try it and tell me the results.

    Regards

    [Reply]

  2. Just realized that the directory tags are being cut out on the comments. So, I’m afraid to tell you that your apache.conf is ok, so it can’t be the cause of your problem. If you use localhost instead of 127.0.0.1 you get the same error?

    Regards

    [Reply]

  3. Ray says:

    Yes, except I have to use localhost:81 or 127.0.0.1:81, since I use DynDNS redirect. I get the same message no matter which browser I use.

    Regards, Ray

    [Reply]

  4. Ray, this is my apache.conf file for phpmyadmin:

    http://pastebin.com/RWExBqtB

    if you would like, paste yours on pastebin.com and send the resulting URL.

    Regards

    [Reply]

  5. Ray says:

    Our files seem identical, except for the .phtml

    http://pastebin.com/2UCRhF4C

    Regards, Ray

    [Reply]

  6. When you try to access these pages, what do you get?

    http://127.0.0.1:81/
    http://172.0.0.1:81/wordpress

    Also, can you do this command on the command line:

    GET http://127.0.0.1:81/phpmyadmin

    and paste the contents?

    Regards

    [Reply]

  7. Ray says:

    The first correctly brings me to my webpage. The second gives me the same message about a phtml file and asks what I want to do with it, save or open with??? (Haven’t found a suitable app yet.)

    Contents below.

    Thanks, Ray

    GET http://127.0.0.1:81/phpmyadmin

    <html xmlns="http://www.w3.org/1999/xhtml&quot;
    xml:lang="”
    lang=””
    dir=””>

    phpMyAdmin –

    <meta http-equiv="Content-Type"
    content="text/html; charset=” />

    // <![CDATA[
    // definitions used in common.js
    var common_query = '';
    var opendb_url = ”;
    var safari_browser = ;
    var querywindow_height = ;
    var querywindow_width = ;
    var collation_connection = ”;
    var lang = ”;
    var server = ”;
    var table = ”;
    var db = ”;
    var token = ”;
    var text_dir = ”;
    var pma_absolute_uri = ”;
    var pma_text_default_tab = ”;
    var pma_text_left_default_tab = ”;

    // for content and navigation frames

    var frame_content = 0;
    var frame_navigation = 0;
    function getFrames() {

    frame_content = window.frames[1];
    frame_navigation = window.frames[0];

    frame_content = window.frames[0];
    frame_navigation = window.frames[1];

    }
    var onloadCnt = 0;
    var onLoadHandler = window.onload;
    window.onload = function() {
    if (onloadCnt == 0) {
    if (typeof(onLoadHandler) == “function”) {
    onLoadHandler();
    }
    if (typeof(getFrames) != ‘undefined’ && typeof(getFrames) == ‘function’) {
    getFrames();
    }
    onloadCnt++;
    }
    };
    // ]]>

    <frameset cols="” rows=”*” id=”mainFrameset”>

    <frame frameborder="0" id="frame_navigation"
    src="navigation.php”
    name=”frame_navigation” />

    <frame frameborder="0" id="frame_content"
    src="”
    name=”frame_content” />

    <frame frameborder="0" id="frame_navigation"
    src="navigation.php”
    name=”frame_navigation” />

    ray@ray-desktop:~$

    [Reply]

  8. Ray, remove for now the .phtml on the AddType line on the apache.conf and give it a try.

    Regards

    [Reply]

  9. Ray says:

    Miguel, I cleaned out the cache and rebooted after deleting .phtml. Get the same message from Firefox asking me what to do with the file:

    1. Open with ??
    2. FlashGot with choice of (Browser Built In), KDE KGET, or Wget. These save the file on my desktop.
    3. Save file

    Looks like I’ll have to live without WordPress. Sorry to have taken up so much of your time, but I do appreciate your help.

    Ray

    [Reply]

    admin Reply:

    Hi Miguel,

    Thanks for answering so promptly. I hope the info below is what you’re
    asking me for.

    Thanks again,

    Ray

    # phpMyAdmin default Apache configuration

    Alias /phpmyadmin /usr/share/phpmyadmin


    Options FollowSymLinks
    DirectoryIndex index.php


    AddType application/x-httpd-php .php

    php_flag magic_quotes_gpc Off
    php_flag track_vars On
    php_flag register_globals Off
    php_value include_path .

    # Authorize for setup


    AuthType Basic
    AuthName “phpMyAdmin Setup”
    AuthUserFile /etc/phpmyadmin/htpasswd.setup

    Require valid-user

    # Disallow web access to directories that don’t need it

    Order Deny,Allow
    Deny from All


    Order Deny,Allow
    Deny from All

    [Reply]

  10. Hi Ray,

    don’t need to apologize, I love to help people! Right now I’m busy at work so I can’t be of much help. But let me think on this problem and read documentation/examples online to try to achieve a solution.

    Best regards

    [Reply]

  11. Miguel Rentes says:

    Hi Ray,

    you can change your root user password under mysql with the following command:

    $ mysqladmin -u root password NEWPASSWORD

    or any other user:

    $ mysqladmin -u USER -p OLDPASSWORD password NEWPASSWORD

    or within mysql prompt:

    $ mysql -u root -p
    $ mysql> use wordpress;
    $ mysql> update user set password=PASSWORD(“NEWPASSWORD”) where User=’USER';
    $ mysql> flush privileges;
    $ mysql> quit

    Tell me if it worked :)

    Regards,
    Miguel

    [Reply]

  12. Ray says:

    Hi Miguel,

    I’ve worked so long on this that nothing makes much sense anymore. I was able to change the pw and enter mysql in the terminal, however I now get message “Error establishing a database connection’ when going to 127.0.0.1:81/wordpress or “Firefox can’t establish a connection to the server” at 127.0.0.1/wordpress.

    http://127.0.0.1:81/phpmyadmin says “The requested URL /phpmyadmin was not found on this server.” http://127.0.0.1/phpmyadmin says “Firefox can’t establish a connection to the server at 127.0.0.1. Apache/2.2.16 (Ubuntu) Server at 127.0.0.1 Port 81″

    I tried modifying the files /etc/phpmyadmin/config-db.php and /etc/dbconfig-common/phpmyadmin.conf to reflect my root name and pw, but the results are the same.

    Just a maddening situation.

    Ray

    [Reply]

  13. Hi Ray,

    First things first. Leave /etc/phpmyadmin/config-db.php and /etc/dbconfig-common/phpmyadmin.conf as it is by default (if you want I can output these two files as I have them) for now.

    If your apache server can’t find URL /phpmyadmin then there’s probably a mis-configuration on your apache server. From your output above, you don’t have to include port 81 on the URL as apache is already redirecting you to port 81.

    Please try the URL http://127.0.0.1/phpmyadmin again but this time do a “sudo tail -f /var/log/apache2/error.log” and post here what is the error apache logs when you try to access phpmyadmin site.

    Regards,
    Miguel

    [Reply]

    admin Reply:

    Hi Miguel,

    Please output the files. Actually I do need to include the :81 in the
    URL. If I leave it out, I get “Firefox can’t establish a connection to
    the server at 127.0.0.1.” 127.0.0.1:81 will take me to my website. Same
    with localhost and localhost:81.

    Using: http://127.0.0.1/phpmyadmin, I get:

    ray@ray-desktop:~$ sudo tail -f /var/log/apache2/error.log

    [Tue Nov 16 05:10:36 2010] [error] [client 127.0.0.1] File does not
    exist: /var/www/favicon.ico
    [Tue Nov 16 05:10:39 2010] [error] [client 127.0.0.1] File does not
    exist: /var/www/favicon.ico
    [Tue Nov 16 05:11:21 2010] [error] [client 127.0.0.1] File does not
    exist: /var/www/phpmyadmin

    Using: http://127.0.0.1:81/phpmyadmin

    [Tue Nov 16 05:14:36 2010] [error] [client 127.0.0.1] File does not
    exist: /var/www/phpmyadmin

    I just looked in /var/www/ and found a folder for wordpress but none for
    phpmyadmin, which may explain the problem. Phpmyadmin does not exist,
    which is why when I try 127.0.0.1:81/wordpress, I get, “Error
    establishing a database connection.”

    I’m pretty sure there was a php folder there initially, but since I had
    installed A2 and php-mysql years before, I thought there might be a
    conflict after installing the apps according to your protocol and
    removed all of them (php and mysql) yesterday before reinstalling them.
    I think what I need now is for you to output the files above and tell me
    how to get php where it belongs, or at least a where to get where it is.

    I know you’re busy and will take time to respond. If I don’t get back to
    you shortly after your answer, it’s because I’m off camping. Will return
    sometime tomorrow (Wed) and try your suggestions then.

    Thanks, Ray

    [Reply]

  14. Joseph Smidt says:

    Thanks for the tutorial. I am getting this error when going to http://127.0.0.1/phpmyadmin/: “Cannot load mysql extension”

    Any idea what this is and how I can fix it? Thanks.

    [Reply]

  15. Hi Joseph,

    I didn’t have that error when I installed wordpress. Please try installing package php5-mysql and tell me if it worked. If it works I’ll update the post to include this package.

    Regards

    [Reply]

  16. Hi Ray,

    I don’t have a folder named phpmyadmin on /var/www. This is what I have on my notebook:

    miguel@c31828:~$ ll /var/www/
    total 2916
    drwxr-xr-x 4 root root 4096 2010-11-30 14:59 ./
    drwxr-xr-x 16 root root 4096 2010-10-12 09:03 ../
    -rw-r–r– 1 root root 177 2010-07-01 15:45 index.html
    drwxr-xr-x 2 root root 4096 2010-07-01 16:19 logos/
    drwxr-xr-x 5 root root 4096 2010-06-30 19:08 wordpress/
    -rw-r–r– 1 miguel miguel 2964966 2010-06-30 17:38 wordpress-3.0.zip

    miguel@c31828:~$ ll /etc/apache2/
    total 92
    drwxr-xr-x 7 root root 4096 2010-11-25 16:56 ./
    drwxr-xr-x 166 root root 12288 2010-11-30 14:22 ../
    -rw-r–r– 1 root root 7994 2010-09-08 13:52 apache2.conf
    drwxr-xr-x 2 root root 4096 2010-11-25 16:55 conf.d/
    -rw-r–r– 1 root root 1169 2010-09-08 13:52 envvars
    -rw-r–r– 1 root root 0 2010-06-30 16:32 httpd.conf
    -rw-r–r– 1 root root 31063 2010-04-13 21:20 magic
    drwxr-xr-x 2 root root 12288 2010-11-25 16:56 mods-available/
    drwxr-xr-x 2 root root 4096 2010-06-30 17:10 mods-enabled/
    -rw-r–r– 1 root root 750 2010-04-13 21:20 ports.conf
    drwxr-xr-x 2 root root 4096 2010-11-25 16:56 sites-available/
    drwxr-xr-x 2 root root 4096 2010-06-30 16:32 sites-enabled/

    miguel@c31828:~$ ll /etc/apache2/conf.d/
    total 24
    drwxr-xr-x 2 root root 4096 2010-11-25 16:55 ./
    drwxr-xr-x 7 root root 4096 2010-11-25 16:56 ../
    -rw-r–r– 1 root root 269 2010-04-13 21:20 charset
    lrwxrwxrwx 1 root root 45 2010-06-30 17:10 javascript-common.conf -> /etc/javascript-common/javascript-common.conf
    -rw-r–r– 1 root root 3296 2010-04-13 21:20 localized-error-pages
    -rw-r–r– 1 root root 143 2010-09-08 13:52 other-vhosts-access-log
    lrwxrwxrwx 1 root root 28 2010-06-30 17:12 phpmyadmin.conf -> ../../phpmyadmin/apache.conf
    -rw-r–r– 1 root root 1481 2010-04-13 21:20 security

    miguel@c31828:~$ ll /etc/phpmyadmin/
    total 48
    drwxr-xr-x 2 root root 4096 2010-10-12 09:59 ./
    drwxr-xr-x 166 root root 12288 2010-11-30 14:22 ../
    -rw-r–r– 1 root root 871 2010-04-14 09:31 apache.conf
    -rw-r—– 1 root www-data 517 2010-10-12 09:59 config-db.php
    -rw-r–r– 1 root root 168 2008-12-09 20:00 config.footer.inc.php
    -rw-r–r– 1 root root 168 2008-12-09 20:00 config.header.inc.php
    -rw-r–r– 1 root root 3918 2010-08-24 15:27 config.inc.php
    -rw-r—– 1 root www-data 8 2010-06-30 17:12 htpasswd.setup
    -rw-r–r– 1 root root 570 2008-12-09 20:00 lighttpd.conf
    -rw-r–r– 1 root root 295 2010-01-03 14:46 phpmyadmin.service

    Also, the main folder for phpmyadmin should be in /usr/share/phpmyadmin as it is expressed on/etc/phpmyadmin/apache.conf:

    Alias /phpmyadmin /usr/share/phpmyadmin
    (…)

    Please tell me if you need more help on your apache/phpmyadmin configuration.

    Best regards

    [Reply]

    admin Reply:

    Hi Miguel,

    I finally got everything to work. Not sure how since I tried numerous
    solutions. Now I can’t install new themes. They all seem to be win files
    and when I download them I keep getting messages that say the data can’t
    be downloaded into folder xx. I create the folder and it then says it
    can’t download into the folder yy in folder xx. Even after I create all
    the missing folders, they remain empty.

    Ray

    [Reply]

  17. Rudy says:

    Thank you for the excellent guide for WordPress with Ubuntu! I’m new to Linux and WordPress and these instructions were just what I needed. I did have the “Error establishing a connection” problem, but I just delete the user account, recreated it, and modified the config file again and it worked fine. Thanks again!

    [Reply]

  18. Hi Rudy,

    I’m very happy I could help you :)

    Best regards,
    Miguel

    [Reply]

  19. toddbmobile says:

    WordPress is installed and working I just want to get FTP working
    I did this:
    sudo aptitude install vsftpd
    all went well.
    I created this with:
    sudo gedit /etc/vsftpd.conf
    added this like you did:
    anonymous_enable=YES
    local_enable=YES
    write_enable=YES
    local_umask=022
    anon_upload_enable=YES
    anon_mkdir_write_enable=YES
    saved the file.
    Next I ran this even after rebooting:
    sudo service vsftpd start
    and I get Error message “unrecognized service”
    So when I go to “Connection Information” to install new theme I get
    Failed to connect FTp Server 127.0.0.1:21
    Please help any idea where I have went wrong?

    [Reply]

  20. toddbmobile says:

    Ok got vsftpd working, but when it starts downloading themes and plug-ins it says it cannot create the update folder in wordpress/wp-content (even after I add the folder and chmod it 777). Any ideas?

    [Reply]

  21. uppp says:

    cannot create the update folder in wordpress/wp-content

    i think you need to change permission on your themes folder too.

    [Reply]

  22. Johnny says:

    For anyone getting the problem where going to phpmyadmin downloads a phtml file, try clearing your firefox driver cache.

    I tried all the advanced stuff first, and this simple thing fixed it.

    [Reply]

  23. Johnny says:

    For the problem…

    “cannot create the update folder in wordpress/wp-content”

    Solution…
    cd /var/www
    sudo chown -R www-data:www-data wordpress

    WordPress is the user www-data. That solved upload issues too.

    [Reply]

  24. classer says:

    Hello,

    All my installs went well. I got “http://127.0.0.1/” to return the message:

    It works!
    This is the default web page for this server.
    The web server software is running but no content has been added, yet.

    but after installing php5 & phpMyAdmin via:

    ‘sudo aptitude install php5 phpmyadmin’

    I tried to go to “http://127.0.0.1/phpmyadmin” and I get this error message in Firefox:

    Not Found
    The requested URL /phpmyadmin was not found on this server.
    Apache/2.2.14 (Ubuntu) Server at 127.0.0.1 Port 80

    How come this is happening?

    [Reply]

  25. Hi,

    Can you do a tail on the log file /var/log/apache2/error.log and see what is the error when you go to “http://127.0.0.1/phpmyadmin/”?

    [Reply]

  26. classer says:

    Hi Miguel,

    Ok after trying to go to “http://127.0.0.1/phpmyadmin/” I got the following in /var/log/apache2/error.log :

    [Wed Feb 16 16:15:45 2011] [error] [client 127.0.0.1] File does not exist: /var/www/phpmyadmin
    [Wed Feb 16 16:15:46 2011] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico

    [Reply]

  27. Hi classer,

    My phpadmin installation is on /usr/share/phpmyadmin. Do you have a file phpmyadmin.conf under /etc/apache2/conf.d/? This conf file is where it’s listed the phpmyadmin directory to be loaded by the web browser. You should have an entry on this file like

    Alias /phpmyadmin /usr/share/phpmyadmin

    Please check your phpmyadmin.conf file. Also, the instalation through aptitude went without any problems, right?

    Regards

    [Reply]

  28. 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?

    [Reply]

  29. 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

    [Reply]

  30. 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$

    [Reply]

Leave a Reply