With CentOS 7, how to install wordpress withouth elimininating Joomla?

December 16, 2016 774 views
Apache MariaDB

Hi everyone, im new here and im learning ^^.
I already installed Joomla in my CentOS 7 and later Wordpress following some instructions of the community, the case is that when i start my server the first thing i see is the WordPress, ( i think i "deleted" or mixed the Wordpress with Joomla so there is no way i can enter to Joomla in my server)
So what i want to do is to enter on my server and what i first want to see is Joomla and later be able to enter with another link to Wordpress , having them two working.

PD: Sorry if there are some english mistakes. Thanks for your time

1 comment
1 Answer
xMudrii December 16, 2016
Accepted Answer

What is your directory structure for /var/www/html now?
You can play around it and set up both Joomla and WordPress correctly.

Now, that really depends on what you want. One of two possibilities are:

  1. Joomla is main and you want to call WordPress with example.com/blog.
  2. Joomla is main and you want to call WordPress using subdomain, e.g. blog.example.com. I'm assuming you want Joomla as main website, as you already used it. Same is if you want WordPress as main and Joomla as subsite.

For first, store Joomla in /var/www/html. You can store WP in /var/www/html/blog.
Create blog directory, apply needed permissions and install WordPress there. You can basically follow WordPress tutorial as it is. Just to note that you don't change /var/www/html (where Joomla lives), you change /var/www/html/blog! So when you see something saying do it on /var/www/html, you are doing on /var/www/html/blog.

Now, for second... Let's create directory for WP - /var/www/blog.example.com/html. This requires you playing around Virtual Hosts and DNS configuration. It's harder solution, but can be more suitable depending on usage.
First create CNAME record for blog pointing to @, then create needed Virtual Host for that subdomain. How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 16.04 should help you set up needed Virtual Host.
And you are ready to follow WordPress tutorial. Just to note again, when you see /var/www/html use /var/www/blog.example.com/html.

This is two possible solutions. I think one of it is best way to set up it.
You can't store both in same directory, e.g. /var/www/html. In that case WordPress (if installed after Joomla) will overwrite some of Joomla files, and Joomla will stop working. That's way you need to use special directory for it.

WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. WordPress has seen incredible adoption and is a great choice for getting a website up and...
  • Done! All i did was remove everything from /var/www/html/ and reinstall both wordpress and joomla doing a mkdir for each one in html. Thanks for the info!

Have another answer? Share your knowledge.