Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Using Wordpress on a Silverstripe Subdomain


Go to End


13 Posts   8671 Views

Avatar
blue wire

Community Member, 2 Posts

5 February 2009 at 8:59am

Hello-

I couldn't find anything that specifically addressed this topic in the archives. I love Silverstripe, but I also love Wordpress. I want to put a Wordpress install on a subdomain but after I map the subdomain to the proper directory and upload Wordpress I get the following error:

Not Found

The requested URL /sapphire/main.php was not found on this server.

I there something in Silverstripe that doesn't let you make custom subdomains? Am I being stupid?

Thanks for the help.

Avatar
Willr

Forum Moderator, 5523 Posts

5 February 2009 at 11:49am

You might need to edit your .htaccess file in your SilverStripe install. It has a 'RewriteBase /' or something. Try changing that path to the path of your silverstripe installation.

Avatar
blue wire

Community Member, 2 Posts

5 February 2009 at 11:59am

Edited: 05/02/2009 12:00pm

Thanks for the reply Will-

This is my .htaccess:

-------------------------------------------------------------------------------------------------------------------------------------------------------

redirect 301 /sitemap-2 http://www.domain.net/sitemap/

AddType application/x-httpd-php .htm .html

### SILVERSTRIPE START ###
RewriteEngine On
RewriteBase /

# Canonicalization
RewriteCond %{HTTP_HOST} ^domain\.net
RewriteRule ^(.*)$ http://www.domain.net/$1 [R=permanent,L]

RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$

RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
### SILVERSTRIPE END ###

-------------------------------------------------------------------------------------------------------------------------------------------------------

All the Silverstripe files are in 1 directory (e.g. /usr/home/words/public_html/general/domain.net)

The subdomain is mapped to a file in the above directory (e.g. /usr/home/words/public_html/general/domain.net/subdomain)

I uploaded all the Wordpress files to the subdomain directory but when I visit it in a browser I see the following error:

Not Found

The requested URL /sapphire/main.php was not found on this server.

Avatar
Willr

Forum Moderator, 5523 Posts

5 February 2009 at 12:11pm

maybe try change RewriteBase / to RewriteBase /usr/home/words/public_html/general/domain.net/ . Or remove it completely and see what happens!

Avatar
Sophie

Community Member, 33 Posts

7 May 2009 at 8:13am

I am dealing with this very same issue, blue wire. Can you tell me if you found a solution and what it is?

Sophie

Avatar
Nivanka

Community Member, 400 Posts

8 May 2009 at 3:37am

easily you can solve this by making the wordpress to use a .htaccess

I think it is on the Reading section of the wordpress CMS, and there is some option, when you select it, it will make readable URLs and it will drop a new .htaccess. with this you can avoid the collisions easily, but still it is not a proper answer I guess ;)

Avatar
AdamMWMM

Community Member, 12 Posts

14 May 2009 at 6:28am

Edited: 14/05/2009 6:29am

Has this been resolved? As I have not been able to get the blog module working, I was hoping to use a Wordpress blog in a subfolder exactly as the user above has.

I cannot get to the Wordpress CMS to create the .htaccess file since it is blocked by SilverStripe.

Thanks for any advice!

Avatar
AdamMWMM

Community Member, 12 Posts

14 May 2009 at 6:36am

Nevermind, I got it.

The Wordpress subfolder I created was named /blog so I added the following line into my .htaccess file:

RewriteCond %{REQUEST_URI} !/blog

Everything seems to be working now!

Go to Top