How to install Wordpress on Ubuntu LInux locally using LAMP stack


Published on

I show how to install wordpress locally on Ubuntu linux distribution. You can use this setup with other linux distros including Fedora but you will have to use a different package manager.

We will first need to install the (Linux, Apache, Mysql and PHP)LAMP stack using tasksel tool. We will then set up a mysql password in order to create databases down the line.
We install the LAMP stack using the command
sudo tasksel install lamp-server

Once that it done, make sure to grant yourself ownership permissions to
the www folder using chown command. Next download Wordpress zip file or tar from the website found here:

unzip it or untar it, make sure you then move it to the www directory. You will need to put it in this folder for Wordpress to function properly as it is the home of the web server(Apache). This is where you will put all your WP themes, free and premium ones. You need to create database tables as you need it for wordpress to have all it's functions. Make sure that you type in your particular username and passwords, or you can use mine as examples.

Wordpress installation in Linux Ubuntu is the hardest of all because it's not a simple install like WAMP or MAMP, Bitnami. You should then use the wp-config.php file and edit it the way I show on the video. Change the username to yours from mysql and the corresponding password.

Lastly you should be able to see your new wordpress installation on the localhost/wordpress url. Make sure that you pick the username you want as you won't be able to change it later, followed by your password. If you have any questions, make sure to leave a comment and subscribe to my channel.

best wordpress plugins 2014
Wordpress free themes,
wordpress ecommerce
WP installation on linux
locally install wordpress,
Wamp installation of wordpress
LAMP installation of wordpress
install wordpress locally
how to install WP in Window 7, locally MAC OS Lion and LInux Ubuntu or Fedora,
LAMP wordpress Setup
how to setup wordpress on Ubuntu 2014.
best wordpress hosting
Ubuntu 12.04

Published in: Technology
  • Be the first to comment

  • Be the first to like this

How to install Wordpress on Ubuntu LInux locally using LAMP stack

  1. 1.• • ThispresentationwascreatedbyErickBarron • How to install Wordpress on Ubuntu, Locally
  2. 2. Install LAMP With Tasksel WewillfirstneedtoinstalltheLAMP stack,whichwill serveas thefoundationforWordpress.Thiswillinclude Linux,Apache,MySqlandPHP. Wewillbeinstallinga developertoolknownas ‘tasksel. Thenusetaskselto installthelamp-server Warning:‘tasksel’isapowerfultoolandcanoverwrite allofyourUbuntudesktopsettings,somakesuretouse itcarefully 1 2• • ThispresentationwascreatedbyErickBarron • RunDown We first open terminal and install the ‘tasksel’ tool using ‘sudo’ for elevated privileges. Then we can use ‘tasksel’ to install the lamp-server. Finally, we should choose a mysql password, since it’s a local installation you can choose something simple like ‘root’. One optional step you can do to check if your installation went correctly is to check for the ‘PHP’ version. We can check it using ‘php -v’ in the terminal, you should see version 5.3 as of this presentation. $sudoapt-get–yinstalltasksel $sudotaskselinstall lamp-server Shell Commands & MySQL Password 3 EnterMySQLMasterPassword
  3. 3. Change Ownership and Permissions OncetheLAMPserverinstallationisdone,youwillhavea newlycreateddirectoryunder $cd/var/www Theproblemisthatbydefaultwedon’thave Ownershipandpermissiontowritetothisdirectory.Sowe mustusethe‘chown’commandtochangeownership,and the‘chmod’commandtochangepermissions. Note:Iwillassumeyou’reinthe $cd /var directory 1 2• • ThispresentationwascreatedbyErickBarron • RunDown We needed to change ownership recursively to our www directory in order to allow access. Make sure you put your own user:group name and not the actual words. We also need read and write capabilities for our user, but not for any ordinary individual, this is why we used ‘755’ instead of ‘777’. Using ‘777’ is a security concert, so you should usually avoid it. $sudochown–Ruser:groupwww $sudochmod 755www Shell Commands
  4. 4. Download and Unzip Wordpress Youshouldnowheadovertowordpress.orgwebsite anddownloadthelatestversion.Iwilldownloadthezip, butyou’refreetodownloadwhicheverformatyou prefer. Wewillnowmoveitintoournewlyavailable‘www’ folder.Thisiswherewewillbeabletoputallofour Wordpresswebsitesinthefuture,as wellanyother ‘PHP’script. 1 2• • ThispresentationwascreatedbyErickBarron • RunDown This is just a very simple zip download, go to the website and click on the big blue button that says ‘Download’. Change directory to ‘Downloads’ and unzip the newly located wordpress zip file. Make sure that you change the ‘X.X’ with your appropriate version number, in my case it was ‘3.9’ as of the time of this presentation. Lastly, we will head over to our new wordpress directory found in our ‘www’ folder. $cd~/Downloads $–d /var/www Shell Commands 3 $cd/var/www/wordpress
  5. 5. MySQL Database Setup Asyoucan imagine,Wordpressneedstostorealotof informationlikeimages andposts,italsocreatespages dynamicallyamong otherthings.So weneedtocreatea newdatabaseuser,sethispasswordandgivehimfull privileges. Solet’sheadovertoterminalandlogintotheMySQL withthepasswordwecreatedduringourinitiallamp- serverinstallation 1 2• • ThispresentationwascreatedbyErickBarron • RunDown In order to create any databases, we must first login to mysql with the password we had originally created from the ‘tasksel’ lamp-server install. We have to create a new database that you’re free to name whatever you want, just make sure you use a proper name like ‘wordpressdb’ and not the actual ‘dbname’. Lastly, it’s a good idea to create a new user that will handle all of the Wordpress database functionality, so put your desired name under ‘user’. $mysql –uroot–p Enteryourpassword CREATEDATABASEdbname; Shell and MySQL Commands 3 CREATEUSERuser@localhost;
  6. 6. MySQL Database Setup Continued Afterwecreatethedatabaseandtheuser,it’s timeto givethenewusera passwordandgrant himfull privilegestotheWordpressDatabase.Wealsoneedto doa bitofMySQLmaintenanceandexit. 1 2• • ThispresentationwascreatedbyErickBarron • RunDown Set a secure password for the new user where it says ‘password’, this is always a best practice. Now grant all privileges to ‘user’ for all(*) the new Wordpress tables. Then we just need to ‘flush privileges’ to restart the system and finally we ‘exit’. SETPASSWORDFORuser@localhost= PASSWORD(‘password’); GRANTALLPRIVILEGESONdbname.* TOuser@localhostIDENTIFIED BY‘password’; Shell and MySQL Commands Continued 3 FLUSHPRIVILEGES exit
  7. 7. Setting up wp-config.php Let’sheadbacktoour $cd/var/www/wordpress directory,andwewillseeafilename wp-config- sample.php,changenameto $mvwp-config-sample.phpwp-config.php Thisiswhereweneedtoputournewlycreateduser, dbnameanddbpasswordwejustcreatedinourlast slide. Ifyou‘vim’’ or‘gedit’yourwayintothefile,aroundline ‘19’ youwillfindthecorrespondingfields. 1 2• • ThispresentationwascreatedbyErickBarron • RunDown Make sure you put your corresponding database name, the username or ‘user’ we created, and the ‘password’ you had assigned the ‘user’. There will also be a field for ‘DB_HOST’, that should be set to ‘localhost’ by default, leave that alone, since we’re going to be using our local machine, this will work for us. After you have changed the fields, make sure you save quit. ‘database_name_here’ ‘username_here’ Shell and MySQL Commands Continued 3 ‘password_here’
  8. 8. Wordpress 5 Minute Install Wenowcango throughthefamous5 minuteinstall. Youshouldheadovertoyourfavoritebrowser, I personal;yuseChromeorFirefoxbutyou’refreeto chose. Warning:Youwillnotbeabletochangeyourusername after,sochoosewisely. 1 2• • ThispresentationwascreatedbyErickBarron • RunDown After you go to the URL, you will find a common form where you will be required to input basic information. Things like ‘username’, ‘password’, ‘email’ and more. You can change everything later on the control panel except for you ‘username’. One thing to note is that even though this installation is local, you will have to the chance to retrieve your password fi you do forget, which is something I had to do many times . You should see a Welcome page and you’re done. Goonyourbrowserto localhost/wordpress Fill in all therequiredfields Browser and Wordpres Configuration 3 Loginwith yournew ‘username’andpassword
  9. 9.• • ThispresentationwascreatedbyErickBarron • Thanks for Watching and head over to