My own experience of this has been quite long-winded, with hours/days of research, across many different pages and some troubling access issues. However, this is relatively simple when you know how, and you do not need to stick to one CMS. For example, you could be running Wordpress and Joomla on the same server depending on your own, or your client’s preference.

To start this off we can either assume you have the basic LAMP installed i.e. Linux, Apache, MySQL and PHP.

I’ve found the best source of instruction for this is:

https://www.tecmint.com/install-wordpress-on-ubuntu-16-04-with-lamp/

This page also gives instruction for WordPress install.

For Joomla installs the best source of instruction is:

https://idroot.net/linux/install-joomla-ubuntu-16-04/

For multiple installations of either CMS you would create your new directory under “/var/www/” and follow each instruction specific to the package.

 

WORDPRESS:

cd /var/www

Sudo Mkdir /var/www/(New folder)

cd (to where the WP files have been stored)

sudo rsync -av wordpress/* /var/www/(New folder)/

sudo chown -R www-data:www-data /var/www/(New folder)/

sudo chmod -R 755 /var/www/(New folder)/

Joomla:

cd /var/www

Sudo Mkdir /var/www/(New folder)

cd (to where the WP files have been stored)

unzip Joomla_3.5.1-Stable-Full_Package.zip -d /var/www/(New folder)/

sudo chown -R www-data:www-data /var/www/(New folder)/

sudo chmod -R 755 /var/www/(New folder)/

 

Create a new database for your new installation. You can create a new user to administer the database if required or you can use the same user created in the first installation.

 

mysql -u root -p

CREATE DATABASE wp_myblog;

GRANT ALL PRIVILEGES ON wp_myblog.* TO 'your_username_here'@'localhost' IDENTIFIED BY 'your_chosen_password_here';

FLUSH PRIVILEGES;

EXIT;

 

Letting apache know that there’s a new site.

In the directory /etc/apache2, if it’s not already there, create the file httpd.conf.

 

cd /etc/apache2

dir

Sudo nano httpd.conf

 

Add a new virtual host section

 

<VirtualHost *:80>

ServerName www.new_website .com

DocumentRoot /var/www/(New folder)

ServerAlias new_website.com *.new_website.com

</VirtualHost>

 

Ctrl x to exit and y to save the file.

 

Now restart Apache and MySQL

sudo systemctl restart apache2.service

sudo systemctl restart mysql.service

 

Effectively you have now created a new website ready to configure. However, there is one last thing to check and that is that DNS is fully configured. To do this go to your hosting site and ensure that the DNS configuration for your new website has the following three lines for DNS

Name

Type

TTL

Value

@

A

3600

IP.ADD.R.ESS

*

A

3600

IP.ADD.R.ESS

www

A

3600

IP.ADD.R.ESS

 

Note: IP.ADD.R.ESS = public address of your server. This can be the same for all sites.

 

Once DNS refreshes you will be able to get to the initial configuration page of your website.

Hope this has been helpful.