• Resolved frivera

    (@frivera)


    Never used a forum before so pls keep that in mind. Here’s the issue.
    I’m trying to create a multi-site, and followed the steps on sunrise, wp-content, domain_mapping.php, etc. Everytime I go to domain mapping, I get the “uncomment sunrise or insert define sunrise on, yadda yadda…” ok. So I looked thru the forums and found a lot of ppl with the issues and have tried following the steps given to them as well. One of them claimed by deactivating the plugin (I assumed the WordPress MU Domain Mapping plugin), re-uploading the files, then reactivating the plugin, worked fine. I did it, but everytime I try reactivating the plugin, I get the following:

    Fatal error: Cannot redeclare dm_add_pages() (previously declared in /home4/ppliknow/public_html/wp-content/plugins/wordpress-mu-domain-mapping-cn/domain_mapping.php:29) in /home4/ppliknow/public_html/wp-content/plugins/wordpress-mu-domain-mapping/domain_mapping.php on line 61

    I’m assuming this means “no bueno”…

Viewing 15 replies - 16 through 30 (of 32 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    everytime I try to access one of my sites other than the root, I can’t log in and it comes up in ugly, plain text.

    AH! THAT is normally a .htaccess error.

    What’ve you got in yours?

    Thread Starter frivera

    (@frivera)

    *hoping in I didn’t change anything*

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+)  wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress
    Thread Starter frivera

    (@frivera)

    hey, just looking at this. and really readin’ this for my first time so just trying to make sense of this.

    I’m assuming (and i know the caps matter, but for instructional purposes only, i’m gonna just use lowercase):

    rewrite engine on
    rewritebase / <------ adds the slash to my url
    rewrite rule index.php-L <------ adds the name of the pg
    rewrite rule symbols galore, yadda yadda pnp?file=$2 L <-----tells what my name is
    and judging if I'm understanding this correctly, the next line is where I messed it up at, around the ---> wp-admin$ $1wp-admin/ <----

    now what’s bad is I know this is me trying to make sense of this and ur gonna say… “no, dude. u forgot to add a ; up here… see? it works now!” and that’s why I wanted u (and whoever else that reads this) to know upfront: THIS IS MY FIRST TIME REALLY READING THIS! lol

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You were close.

    RewriteBase – Where we start from. So if you have WordPress in domain.com/foobar, your base would be /foobar/

    RewriteRule index.php says “I’m using index.php to handle all this!”

    The rest of the stuff is saying ‘I’ve got to look in anything that says domain.com/foo/wp-admin, AND I have to look for /files/ and all these other things because I’m in charge of virtual subfolders!’

    Now here’s where you will hit your head on your desk. Ready? That .htaccess is perfect… For SubFolder sites. As you stated, you switched to subDOMAIN, and the .htaccess was not changed.

    Don’t worry. This is easy.

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    # END WordPress

    That’s the one for SubDomains. Try that out.

    Thread Starter frivera

    (@frivera)

    Sorry, brother. Didn’t work…

    Hey, I noticed, tho, we’re setting up subDOMAINS, right? well in my sites edit pg, the site is set up like a subDIRECTORY.
    https://www.example.com/directory
    could that be a problem or am I looking too into it? In the end, that’s how I want them set up as (a subdirectory)…

    Thanks again for all the help. It is much appreciated.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Wait which one are you on again? You went back and forth and confused me a bit…

    If you’re on SubDIRECTORY, then the one you had was okay.

    And if THAT isn’t working, check your server’s httpd.conf file to see if allowoverride is set to ALL.

    Thread Starter frivera

    (@frivera)

    I think (know) when I set it up I picked subdomain, but now I actually want it set as a subdirectory. When I’m on the “edit site page” screen, it’s shown as a subdirectory (which I want). I think I messed it up when I was mad-scientisting up the code (I may have concocted a formula within my wp-config.php, don’t hate me, this was before we surprisingly realized I wasn’t the CSS expert we believed I was). Anyway, I’ll check with my POC at good ol’ Bluehost about the httpd.conf file (as I believe I don’t have rights on the server).

    Thread Starter frivera

    (@frivera)

    From my Bluehost contact: “You do not have httpd access, do not pass go, do not collect $$…. We give you access to your .htaccess to make changes that are similar to httpd. You can set the allowoverride to all in the .htacess file.”

    Thread Starter frivera

    (@frivera)

    Reading: https://httpd.apache.org/docs/2.0/howto/htaccess.html
    Should I just add:
    <Directory />
    Allowoverride All
    </Directory>

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I believe so, but I’ve only done it via httpd.conf.

    Thread Starter frivera

    (@frivera)

    Ok, so would it be easier to just uninstall/reinstall wordpress at this point? I’m thinkin’ that since the issue is somewhere secret and safeguarded… At this point, I’m cool with it… lol

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The problem of unstyled content is rarely (if ever) resolved by a reinstall. The problem, 99% of the time, is that your server isn’t parsing the more complicated .htaccess rules correctly.

    That said, given everything else you jiggered around, a reinstall would not be a bad idea if you’re not going to lose any data.

    Thread Starter frivera

    (@frivera)

    Sonuva B… AFTER I uninstalled wordpress, I realized I had two files, .htaccess and htaccess, which I’ve been updating htaccess this whole time and not .htaccess… FML!!!

    Thread Starter frivera

    (@frivera)

    Starting it up and at the Network Setup menu. What does this mean?

    Because your install is not new, the sites in your WordPress network must use sub-domains. The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.

    Will I still be able to create sub-directories or settle for sub-domains?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You can still use subdirectories. Go ahead and set it up as subdomains, but when you’re done, change the line in wp config for Subdomain to false.

Viewing 15 replies - 16 through 30 (of 32 total)
  • The topic ‘Domain Mapping / Multi-Site / Sunrise error’ is closed to new replies.