Jump to:

4873 Posts in 7242 Topics by 1471 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Using Wordpress on a Silverstripe Subdomain

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

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

Page: 1 2
Go to End
Author Topic: 4616 Views
  • blue wire
    Avatar
    Community Member
    2 Posts

    Using Wordpress on a Silverstripe Subdomain Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: Using Wordpress on a Silverstripe Subdomain Link to this post

    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.

  • blue wire
    Avatar
    Community Member
    2 Posts

    Re: Using Wordpress on a Silverstripe Subdomain Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: Using Wordpress on a Silverstripe Subdomain Link to this post

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

  • Sophie
    Avatar
    Community Member
    33 Posts

    Re: Using Wordpress on a Silverstripe Subdomain Link to this post

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

    Sophie

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: Using Wordpress on a Silverstripe Subdomain Link to this post

    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 ;)

  • AdamMWMM
    Avatar
    Community Member
    12 Posts

    Re: Using Wordpress on a Silverstripe Subdomain Link to this post

    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!

  • AdamMWMM
    Avatar
    Community Member
    12 Posts

    Re: Using Wordpress on a Silverstripe Subdomain Link to this post

    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!

    4616 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.