Home » Uncategorized » Learn How To Install LAMP Stack, Apache, MySQL, PHP PhpMyadmin On Ubuntu 16.04 Or 18.04 And Create Free Website On Remote Server (VPS)

Learn How To Install LAMP Stack, Apache, MySQL, PHP PhpMyadmin On Ubuntu 16.04 Or 18.04 And Create Free Website On Remote Server (VPS)

This is part 1 of the blog series to learn how to create free website or blog. All the steps one have to follow step by step of to create a website. Read, follow, run all instructions and commands.

1. Install Ubuntu 16.04 or 18.04 LTS to your computer with minimum resources of 1 gb ram , 1 gb swap space, 20 gb ssd or hhd , 1 cpu core and a dedicated Ip address. You can increase this as per your requirement. This is always good and cheap if buy a remote server (VPS) on rent and install your website on that server.

There are many companies providing this service. You can search on internet or click below links.


UK Web Hosting

Start Your Own Online Store

Contabo Germany

Now connect to your server via putty, get access to terminal and login with root/password.

2. Install Apache. Run below mentioned command.

sudo apt update && sudo apt install apache2

3. Install Nano.

sudo apt install nano

4. Install Zip Unzip.

sudo apt-get install zip unzip

5. Install UFW. Run below mentioned commands one by one.

sudo apt install ufw

sudo ufw allow OpenSSH

sudo ufw allow in "Apache Full"

sudo ufw enable

sudo ufw status

6. Add a user. Give any user name of your choice.

adduser username

7. Give rights to your user name.

usermod -aG sudo username

8. Edit sshd config file and change PermitRootLogin yes to no. Press ctrl +x , y and enter to save the file. Run below mentioned command.

nano /etc/ssh/sshd_config

9. Reload the SSH Service for changes to take effect.

sudo systemctl reload sshd

10. Install MySQL

sudo apt update && sudo apt install mysql-server

11. Check MySQL status and press q to exit.

sudo service mysql status

12. Configure MySQL Security & Enter Y Y Y Y

sudo mysql_secure_installation

13. Check Mysql Version

sudo mysqladmin -p -u root version

14. Install PHP

sudo apt update && sudo apt install php libapache2-mod-php php-mysql

15. Check PHP Version

php -version

16. Install PhpMyAdmin

sudo apt update && sudo apt install phpmyadmin

17. Create MySQL User. Run below mentioned commands. Make sure you change ‘pmuser’ and ‘password_here’ with your own. Note and remember the same. Run commands.

sudo mysql -p -u root

CREATE USER 'pmauser'@'%' IDENTIFIED BY 'password_here';



18. Edit and secure PhpMyAdmin.config file. Change the Alias from /phpmyadmin to whatever you want. Press ctrl+x , y and enter save the file. Login to PhpMyAdmin by typing your server’s ip address followed by the alias you just have changed as a url into your windows browser (Ex. Chrome). If you did not change the alias then type you server’s ip address followed by phpmyadmin.

(Ex. After logged in to PhpMyAdmin create a new database in which we will Install WordPress. Run below mentioned command.

sudo nano /etc/apache2/conf-available/phpmyadmin.conf

19. Reload and restart Apache 2

sudo service apache2 reload

sudo service apache2 restart

19. Allow .htaccess Override and Add AllowOverride All underneath DirectoryIndex index.php

sudo nano /etc/apache2/conf-available/phpmyadmin.conf

20. Enable .htaacess.

sudo apt-get update

sudo a2enmod rewrite

sudo service apache2 restart

21. Edit 000-default.conf file. Paste and Save below mentioned lines beneath Documentroot. Press ctrl+x , y and enter save the file.

<Directory "/var/www/html">
  AllowOverride All

sudo nano /etc/apache2/sites-enabled/000-default.conf

22. Configure Apache File. Find the below mentioned coding and change AllowOverride None to AllowOverride All

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted

sudo nano /etc/apache2/apache2.conf

23. Copy and paste below mentioned lines just beneath the above lines you edited.

<Directory /var/www/html>
   Options -Indexes

24. Copy and paste below mentioned lines at the end of the file. Press ctrl+x , y and enter save the file .

ServerSignature Off
ServerTokens Prod

25. Install CURL. Check your php version and type same in command.

sudo apt-get update

sudo apt-get install curl

sudo service apache2 restart

sudo apt-get install php7.0-curl

sudo service apache2 restart

Now done with this part of the series. In next part you will learn how to configure and encrypt SSL certificate free for Apache on Ubuntu 16.04 or 18.04 LTS. Do remember that to create wordpress free website or blog you need to follow each step of each part. Click Here and continue to next part.

Best Freelance Site is Twine. Click Here


  1. Cialis says:

    you are truly a good webmaster. The site loading velocity is incredible.
    It seems that you are doing any unique trick.
    Furthermore, The contents are masterwork. you have performed a wonderful activity on this topic!

  2. buy cialis says:

    Hi! I know this is kind of off topic but I was wondering
    if you knew where I could get a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having difficulty finding one?
    Thanks a lot!

    1. ivylearn ivylearn says:

      Plugin Name is reCaptcha by BestWebSoft. You have to set site & secrete key on Google reCaptcha.

  3. Royal CBD says:

    This website truly has all the information and facts I needed concerning this subject and didn’t know who to ask.

    P.S. If you have a minute, would love your feedback on my new website
    re-design. You can find it by searching for «royal cbd» — no sweat if you can’t.

    Keep up the good work!

  4. Royal CBD says:

    Hey I know this is off topic but I was wondering if you knew of any
    widgets I could add to my blog that automatically tweet
    my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and
    was hoping maybe you would have some experience with something like this.
    Please let me know if you run into anything. I truly enjoy reading your blog and I look
    forward to your new updates.

    P.S. If you have a minute, would love your feedback on my
    new website
    re-design. You can find it by searching for «royal cbd» — no sweat if you can’t.

    Keep up the good work!

  5. Best Corporate Video Production Company in Bangalore and top Explainer Video Company in Bangalore , 3d, 2d Animation Video Makers in Chennai.
    An interesting post it’s really very useful for us. Thanks for sharing this wonderful post with us.

  6. Now, picture your baby clicking on a link that has the cartoon character’s name
    in its URL nevertheless it then seems to be an internet site with pornographic content material.
    This known as creating your profile, where you may even submit a cute picture of your self!
    Updating many times day-after-day with contemporary new smut from a protracted record of niches followers take
    pleasure in, if you examine again right here every single day by bookmarking the site you may always be capable
    to get your eyes on sexy new sluts, unique videos you have by no means seen before and
    also you may even end up increasing your personal sexual horizons by exploring
    a complete new set of sexual fantasies that deliver you a brand new dimension of carnal satisfaction. In reality, based on the American Academy of Pediatrics webpage,
    children within the US spend roughly four hours day by day watching
    Television. An hour here or there each day interacting with folks
    as a substitute of wasting that point viewing online pornography could have massive impacts
    on different individuals.

  7. Hello there, just became alert to your blog through Google, and
    found that it’s truly informative. I am gonna watch out for brussels.
    I’ll appreciate if you continue this in future. A lot of people will be benefited
    from your writing. Cheers! online pharmacy
    https://pharmaciescegs.com/ rx pharmacy

Leave a Reply

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