Now how to add two WordPress Sites on the same WebRole :)

Nov 30, 2011 at 8:20 PM


After my successful workaround to get a wordpress and a silverlight working side by side in a WebRole, I am now really keen to get two WordPress sites inside a WebRole working.

These are the Steps I have taken:

1) under /build/WordPress Copy WebRole folder to WebRole2

2) Add these lines to ServiceDefinition.csdef


<Site name="WebRole" physicalDirectory="./WebRole">
          <Binding name="Endpoint1" endpointName="HttpEndpoint" />
	  <Site name="WebRole2" physicalDirectory="./WebRole2">
          <Binding name="Endpoint3" endpointName="HttpEndpoint3" />



      <InputEndpoint name="HttpEndpoint" protocol="http" port="80" />
      <InputEndpoint name="HttpEndpoint3" protocol="http" port="83" />



      <Setting name="DB_TABLE_PREFIX"  />
      <Setting name="DB_TABLE_PREFIX2"  />    


3) Now that we have a separate Table Prefix for the second site, I also edited WebRole2/wp-config.php

Line 172 -> 


$table_prefix  = azure_getconfig('DB_TABLE_PREFIX2');


After packaging it in Dev mode, it assigns successfully the ports to each site, but then I get this error message below:

Any idea, what I am missing?

Highly Appreciated,