Open In App

How to install PHP on Godaddy server?

Last Updated : 07 Nov, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

GoDaddy VPS is a shared server that provides computational services, databases, storage space, automated weekly backups, 99% uptime, and much more. It’s a cheaper alternative to some other popular cloud-based services such as AWS, GPC, and Azure. PHP or Hypertext Preprocessor is an open-source and general-purpose scripting language created by Danish-Canadian programmer Rasmus Lerdorf in 1994. In web development, it is mainly used as a server-side scripting language that is easily embedded with HTML files. To know more please visit PHP Tutorial. In this article, we will discuss how to install the latest version of PHP on GoDaddy VPS (Ubuntu).

Installing PHP on Godaddy Server

Step 1: Open your terminal and ssh into the GoDaddy Server.

$ ssh username@ip

 

Step 2: Update and upgrade the server by running.

$ sudo apt update -y
$ sudo apt upgrade -y

 

Step 3: Install the latest version of PHP by running the below command:

$ sudo apt install php

 

 

Step 4: Verify the installation by checking the build version.

$ php --version

 

Using PHP on Godaddy Server

Step 1: Create a simple php file that outputs ‘Geeks For Geeks‘.

$ nano gfg.php

 

 

gfg.php:

PHP




<?php
 echo "Geeks For Geeks"
?>


Step 2: Now compile and run the php program

$ php gfg.php

 


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads