0

I have built a website using WordPress. I installed WordPress on root domain i.e www.example.com . Now I want to install a Php Script based website on subdomain and subdirectories i.e subdomain.example.com and www.example.com/subdirectory. I know it is possible to do this but I need the working process to make it possible. If anyone know this then please guide me.

1
  • You need to do it using your webserver's configuration. What webserver are you using? Apache / Nginx?
    – Fayaz
    Jan 28, 2017 at 10:33

1 Answer 1

0

Wordpress supports multi-sites setup for both sub-domain and subdirectory approach, please take a look at Create a Network.

4
  • I know about wordpress multisites but here I'm asking about Installing Php Script on subdomain and WordPress on root
    – freshvibes
    Jan 28, 2017 at 7:15
  • So your so-called 'php scripted based' website means a non-wordpress site? In that case, you may need to create two VirtualHost directives on server level (Apache or Nginx, depend which one you are using), something like <VirtualHost *:80> DocumentRoot "/var/www/html/" </VirtualHost> for site1, and <VirtualHost *:80> DocumentRoot "/var/www/html/site2/" </VirtualHost> for site2
    – hcheung
    Jan 28, 2017 at 7:32
  • Yes, it is non wordpress website. Are u telling me to create two separate directories in var/www/html folder? If yes then what to do after that?
    – freshvibes
    Jan 28, 2017 at 10:38
  • You need to create two virtual host configurations at your server. Since the topic is not related to Wordpress, I don't want to post it here. But you could take a look at this link or search more on serverfault or check with your hosting company. Please noted that my example of /var/www/html/ is an example for typical apache server root directory, you need to check your actual hosting environment for your root directory.
    – hcheung
    Jan 29, 2017 at 1:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.