How to Install Php on Linux?
Contents

A non-root user that can perform sudo tasks.

  • Step 1: Install Apache. Ubuntu 18.04 maintains a central repository where you can install most applications from using the apt command.
  • Step 2: Install MySQL. Run the command below on the terminal window to install MySQL server on your Ubuntu 18.04 VPS.
  • Step 3: Install PHP.

How do I install PHP on Ubuntu?

How to Install Apache, MySQL and PHP on Ubuntu 16.04

  1. Step 1: Install Apache. First, update your package manager.
  2. Step 2: Install MySQL. Enter the following into the shell prompt.
  3. Step 3: Install PHP. The last thing we’ll be doing in this article is installing PHP.
  4. Step 4: Starting Apache and MySQL on boot. This is necessary to start your web environment on boot.

How do I install PHP?

Manual Installation

  • Step 1: Download the files. Download the latest PHP 5 ZIP package from
  • Step 2: Extract the files.
  • Step 3: Configure php.ini.
  • Step 4: Add C:\php to the path environment variable.
  • Step 5: Configure PHP as an Apache module.
  • Step 6: Test a PHP file.
Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest