Ubuntu 14.04 – PHP Version Upgraded

php -v

Shows:

PHP 5.6.25-2+deb.sury.org~trusty+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologiescode

In the page the php code phpinfo();

phpinfo();

Shows:
PHP Version 5.5.9-1ubuntu4.19

Now to correct this you need to:

sudo a2dismod php5
sudo a2enmod php5.6
sudo service apache2 restart

Cheers

Letsencrypt Combining plugins

Combining plugins

Sometimes you may want to specify a combination of distinct authenticator and installer plugins. To do so, specify the authenticator plugin with --authenticator or -a and the installer plugin with --installer or -i.

For instance, you could create a certificate using the webroot plugin for authentication and the apache plugin for installation.

certbot run -a webroot -i apache -w /var/www/html -d example.com

Link: Get more info at Certbot.

Install PHP Composer

1) Update your packages:

sudo apt-get update

2) Install the curl utility:

sudo apt-get install curl

3) Download the installer:

sudo curl -s https://getcomposer.org/installer | php

4) Move the composer.phar file:

sudo mv composer.phar /usr/local/bin/composer

5) Use the composer command to test the installation. If Composer is installed correctly, the server will respond with a long list of help information and commands:

user@localhost:~# composer
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                /_/
Composer version 1.3.2 2017-01-27 18:23:41

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message

Empty File Using echo Command

# echo "" > access.log
OR
# echo > access.log

Note: You should keep in mind that an empty string is not the same as null. A string is already an object much as it may be empty while null simply means non-existence of an object.

For this reason, when you redirect the out of the echo command above into the file, and view the file contents using the cat command, is prints an empty line (empty string).

To send a null output to the file, use the flag -n which tells echo to not output the trailing newline that leads to the empty line produced in the previous command.

# echo -n "" > access.log

Setting permissions for wordpress

Everyone experiencing this issue should execute these commands:

sudo usermod -aG www-data $USER

Adds the currently logged in user to the www-data group.

sudo chown -R www-data:www-data /var/www

Changes the ownership of the /var/www directory to www-data group.

sudo chmod -R 755 /var/www

If this doesn’t fix the issue you’re having, you’ve got something else wrong and bashing DO is not going to help anyone. If you want a managed server, look for hosting elsewhere. If you need help, ask someone or hire an admin that knows how to not only ‘set things up’ but knows how to secure your server as well. You’ll be glad you did. DO is not for novices, even if they have a lot of tutorials.