How to install wordpress on ubuntu (step by step)

To install wordpress on your localhost, you must setup apache and mysql first. We have already posted a tutorial on How to install and configure Apache,PHP,MySql and phpMyadmin on ubuntu.Please read first.

1. Go to wordpress website and download the latest wordpress version in zip format on your desktop and extract. Now you will get wordpress folder.

2.Copy wordpress to /var/www folder

Method 1:
Go to Application -> Accessories -> Terminal. And type the below code in terminal and hit enter.

gksudo nautilus

Type your ubuntu password if needed.

Just copy and paste the wordpress folder from desktop to your /var/www folder.

OR

Method 2:
Go to Application -> Accessories -> Terminal. And type the below code in terminal and hit enter.

cd Desktop
sudo mv wordpress /var/www

Type your ubuntu password if needed.

3.Now create a database using phpMyAdmin, follow these steps:

For phpmyadmin,apache,mysql,php installation click here

Open your browser and type

http://localhost/phpmyadmin/

in the address bar and press enter. Type your mysql root username and password to login.

Also Read:  How to Set Your Favorite Browser as Default through Terminal in Ubuntu

choose a name for your WordPress database,enter it in the Create new database field, and click Create.

4.Install and configure wordpress

Open

http://localhost/wordpress/

in your browser.
If you are getting below error
“Forbidden You don’t have permission to access /wordpress/ on this server”. just change the permission of your wordpress folder.To do this
Go to Application -> Accessories -> Terminal. And type the below code in terminal and hit enter.

sudo chmod 777 -R /var/www/wordpress

Type your ubuntu password if needed.

Now go to http://localhost/wordpress/ and click Create a Configuration File then click Let’s go!.

Type your database name,user name,password,database host and click Submit

and then click Run the install.Fill all the fields and click install wordpress.

Then click Log In.
Type your wordpress username and password to login.Thats all.

If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.



This Post Has 12 Comments

  1. Pep

    Oks thats all ready and it works!! 🙂 But when i try to install new Themes apears connection details and ask me the ftp details and host.
     

    1. connectwww

      just download your theme and unzip.And then move to your themes (/wp-content/themes) folder.

  2. Rasmus Hægg

    can’t make it work either.. “No such file…” but I have both the zip and the extracted folder on my desktop.

    1. admin

      Download the latest wordpress version in zip format on your ‘desktop‘ and extract. Now you will get ‘wordpress‘ folder (the folder name is wordpress)
      and then try the secound method.

  3. Rasmus Hægg

    When I type:
    gksudo nautilus

    I get this:
    Initializing nautilus-gdu extension
    ** (nautilus:12202): DEBUG: Syncdaemon not running, waiting for it to start in NameOwnerChanged

    A root showing my desktop shows up, but thats it, whats wrong!?

    1. admin

      try this in terminal
      rm -rf ~/.local/share/gvfs-metadata

      1. Rasmus Hægg

        thanks for your reply, but nothing happens…

        1. admin

          Or Try 2nd method

  4. Guy K

    You skipped the part about unzipping wordpress after download.
    unzip wordpress-3.3.1.zip

  5. OrO

    thank you it works perfectly

  6. Jeremy Morley

    Be aware that if you access WordPress through “http://localhost/wordpress” in the first instance to do the installation, the blog site will use URLs based on http://localhost. This can be adjusted in the settings for the blog but you have to run the web browser on the machine itself adain to be able to access http://localhost/wordpress to be able to log into the blog.

  7. Pingback: Tweets that mention How to install wordpress on ubuntu (step by step) | CONNECTwww.com -- Topsy.com

Leave a Reply