Run Multiple WordPress Sites on Sub Domains with Single Server

Multiple WordPress Installations on Sub Domains

When it comes to blogging, lot many of us will choose WordPress as a blogging platform because of it’s versatility and ease of use. But when the WordPress platform is self managed (i.e. hosted and installed WordPress manually on server), there can be
many complications related to installations, domain mapping, and managing .htaccess files specially when there are multiple WordPress installations on same server. So, this post will help to setup sub-domain mapping to multiple WordPress installations
on single server.

There are many ways for achieving this functionality like using  .htacess file or using apache2 hosts configurations. In this post we will see the best option where we will Run Multiple WordPress Sites on Sub Domains using apache2 host configuration.
Whenever request comes to server, it will first go to Apache2 and then to .htaccess, if you use .htaccess, it will consume some microseconds and might delay server response. So it’s better to map subdomain requests in apache2 configuration itself.

Note: This is not equivalent to redirecting http://www.example.com/post1 to http://www.example.com/post1-actual. You can use redirection plugin for that purpose.

Resources used:

Instructions file View
Image file View
GoDaddy configurations file View

Prerequisite

1. You must be using Apache2 as server.
2. You need to have root access to your server so that we can make changes to apache2 configuration files.
3. You must have setup subdomain to point to server IP address.
Please check video for more details.

1. Login to Server using SSH and Enable rewrite module:

You can login into the server using SSH, with user having root access so that user can run sudo commands. Execute below command:

2.find apache2 virtual host configuration file:

Next step is to find the Apache2 virtual host configuration file. Note down the location for further steps. For Ubuntu 16.04 with Apache2 below will be default location:

3. Edit default virtual host file : 000-default.conf:

This file is present at location we have found for apache2 virtual host configuration. Execute below command to open file using nano editor:

3. Modify 000-default.conf

Modify the content for tag
, as below:

4.Restart apache2 server and Done!!

Execute below command to restart apache2 server.

You have mapped test1 sub-domain to test1 sub-directory

5. Now map test2 sub-domain to test2 folder:

  • 1. Navigate to nano /etc/apache2/sites-available/
  • copy 000-default.conf as test2.conf
  • Edit test2.conf file
  • Then add the following code to virtual host definition:

    6. Run below command :

    Execute below command:

    7. Restart server, Done!!

    Execute below command:

    You have mapped test2 sub-domain to test2 sub-directory

    So, this is how you can map two separate WordPress installations to different domains.

    Help others by sharing the content!

    Computer Science – Sem VIII

    Artificial Intelligence (AI)

    S-2018 W-2018
    S-2017 W-2017
    S-2016 W-2016
    S-2015 W-2015

    Embedded System (ES)

    S-2018 W-2018
    S-2017 W-2017
    S-2016 W-2016
    S-2015 W-2015

    Network Security (NS)

    S-2018 W-2018
    S-2017 W-2017
    S-2016 W-2016
    S-2015 W-2015

    Software Engineering (SE)

    S-2018 W-2018
    S-2017 W-2017
    S-2016 W-2016
    S-2015 W-2015

    Help others by sharing the content!

    Blogging with Medium or WordPress – How to make a choice?

    Blogging with Medium or WordPress – How to make a choice?

    Blogging with Medium or WordPress - How to make a choice?

    It started when one of my friends (co-founder of QuodeIt), insisted on trying Medium for blogging due to its readability, beautiful UI, better community interaction, great SEO and built-in analytics. And to my surprise it took not more than 30 minutes to shift the entire WordPressblog to Medium. You can really feel the ease of use as you start using Medium. But the real question arises here, should a publisher continue using Medium or stick to WordPress? Lets take a look:

    The main aim of publishing content is to reach to the huge number of audience and increase the visitors traffic. Medium fulfills this requirement efficiently. It provides you The Medium Audience which is missing in self hosted blog. But now, lot of people have started using Medium, so it might be harder to get your contents read, recommended or shared.

    Again, readability is one of the strongest points of Medium. It has a clean white UI throughout all of its pages with exquisite fonts which can get users more interested in the content on your blog. It has also redefined the traditional way of commenting, liking the story which can surely maintain visitors’ interest in your blog and make them stay for longer on your blog!

    Now you can get your own custom domain for medium blog, that too for free! Means you can have that Medium blog on your own domain similar to self hosted WordPress blog. But all of the content on your blog belongs to stored at Medium. Still no need to worry about it, as one click export of all articles will come to your rescue.

    On other hand, self hosted WordPress is capable doing almost everything a Medium blog can do and even lot more, if you possess the proper set of themes and plugins. WordPress gives more room for flexibility since there are simply more options to choose from. Meaning more control over the blog and its content. In this regard WordPress is superior product because it’s meant to be a framework, not just a writing platform. But with great flexibility comes the complexity. It will be quite complicated & time consuming to set up WordPress first and then using it compared to Medium.

    So, the choice depends on how you want use it.

    If you are an author, and the sole motive is reach out to the majority of audience with ease by focusing on content writing rather than focusing on blog utilities. Clearly Medium is the best option!

    If you have your own site or product and need a blog for content marketing, you are going to need more customization, more flexibility and more control over the blog and its content, than an author. Then WordPress is the only better option. But no one has stopped you from republishing your posts on Medium and reach out to more number of audience! As content marketing is the main aim, than increasing the traffic at your blog!

    Ultimately the choice depends upon the purpose of use!!! But Medium will always be there either as a primary or a secondary way for publishing!!

    Help others by sharing the content!