Integrate Wordpress Subdomain

Hi Guys,

A moron here at work decided to go outside the approval chain to get a custom blog built for a sub-project in Wordpress without letting anyone know … and now his developer whinging cause it won’t work - like I told them it wouldn’t when I found out. I wasn’t informed of any of this until AFTER the deal was done and now its been dumped into my lap to fix what these clowns have done. The only articles I have read are very old, going back to 2009. What can I do to get these two sites to work together inside the one cpanel hosting account? I’m thinking that setting up a subdomain for starters and dumping their wordpress install into there but I know I’ll need to do something inside the .htaccess file there to get it to work.

Any tips or ideas?

A few options I can see:

  • Import the Wordpress blog into Silverstripe’s own blog module and can the entire WP install (only one site to manage, no endless WP updates, etc.)
  • Set up the WP install in a subdomain and treat it like a separate site (simpler, but no integration with the main site menus, etc. and you have to manage two codebases)
  • Do the second option above but iframe it into the main site (you get the consistency of navigation, etc. but still have the problems of managing two sites)

In terms of cPanel… I don’t use it, but it should be simple enough to set up a subdomain and point it to a particular, isolated place in the filesystem so it doesn’t interact with the Silverstripe site at all, and no changes should be needed to the htaccess, etc.

Yes, you can integrate WordPress as a subdomain
The process is, installing WordPress on your root domain — you’ll just need to first add your subdomain to your domain’s DNS or via your hosting dashboard.

1 Like

It is not strictly necessary for a sub domain for the blog unless you have differing PHP requirements. I have a project with Wordpress and SilverStripe sitting on the same cPanel server with the following in the .htaccess

RewriteCond %{REQUEST_URI} !^/blog(/.*|$)
RewriteRule ^(.*)$ public/$1

For security reasons it would be better to separate the two but just wanted to say it is possible.