How to Install PHP 7.3 on Ubuntu 18.04<\/a>.<\/p>\nTo get this version of PHP, we need to add third-party repositories to our system.<\/p>\n
Run the following commands to add the ondrej\/php repository:<\/p>\n
sudo apt-get install software-properties-common\r\nsudo add-apt-repository ppa:ondrej\/php<\/pre>\nThen update and upgrade to PHP 7.2<\/p>\n
sudo apt update<\/pre>\nWith this command, we will install PHP 7.2 together with the required modules for Kirby.<\/p>\n
sudo apt install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-sqlite3 php7.2-soap php7.2-gd php7.2-xml php7.2-cli php7.2-curl php7.2-zip<\/pre>\nAfter the installation, we can edit some of the default PHP values in the configuration file. We will use nano as our text editor:<\/p>\n
sudo nano \/etc\/php\/7.2\/apache2\/php.ini<\/pre>\nFind and change the values of the lines shown below:<\/p>\n
file_uploads = On\r\nallow_url_fopen = On\r\nmemory_limit = 256M\r\nupload_max_filesize = 32M\r\nmax_execution_time = 360<\/pre>\nAfter you are finished with making changes, save and close the file.<\/p>\n
For the changes we made to take effect, we need to restart Apache:<\/p>\n
sudo systemctl restart apache2.service<\/pre>\nWe can verify our PHP 7.2 settings by creating an info.php file in Apache2 root directory:<\/p>\n
sudo nano \/var\/www\/html\/info.php<\/pre>\nAdd the following code to the file:<\/p>\n
<?php phpinfo( ); ?><\/pre>\nSave and close the file, then browse your server IP address followed by \/info.php<\/p>\n
For example:<\/p>\n
http:\/\/server_IP_address\/info.php<\/pre>\nYou should be able to see the PHP default test page.<\/p>\n
<\/span>4. Download the Latest Release of Kirby<\/span><\/h2>\nNow is the time to download and install Kirby CMS. We will clone Kirby from their official GitHub with the commands below:<\/p>\n
cd \/var\/www\/html\/\r\nsudo apt install git\r\nsudo git clone --recursive https:\/\/github.com\/getkirby\/starterkit.git kirby<\/pre>\nWe will then set the proper ownership of these files:<\/p>\n
sudo chown -R www-data:www-data \/var\/www\/html\/kirby\/<\/pre>\n<\/span>5. Configure Apache2 for the Kirby Site<\/span><\/h2>\nNow we will create a new virtual host configuration file so that we can access our Kirby application using a domain name. Open a new configuration file like so:<\/p>\n
sudo nano \/etc\/apache2\/sites-available\/kirby.conf<\/pre>\nThen add the following content to the file:<\/p>\n
<VirtualHost *:80>\r\nServerAdmin admin@domain_name.com\r\nDocumentRoot \/var\/www\/html\/kirby\/\r\nServerName domain_name.com\r\nServerAlias www.domain_name.com\r\n\r\n<Directory \/var\/www\/html\/kirby\/>\r\nOptions FollowSymlinks\r\nAllowOverride All\r\nRequire all granted\r\n<\/Directory>\r\n\r\nErrorLog ${APACHE_LOG_DIR}\/error.log\r\nCustomLog ${APACHE_LOG_DIR}\/access.log combined\r\n\r\n<Directory \/var\/www\/html\/kirby\/>\r\nRewriteEngine on\r\nRewriteBase \/\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule ^panel\/(.*) panel\/index.php [L]\r\n<\/Directory>\r\n\r\n<\/VirtualHost><\/pre>\nof course, you will need to replace domain_name<\/code> with your actual domain name in order for this to work. When you finish with editing the configuration file, save the file and exit.<\/p>\n