WordPress.org

Ready to get started?Download WordPress

Forums

Setting up Subdirectory websites (28 posts)

  1. indbiz
    Member
    Posted 3 years ago #

    Hi,

    It's my first time setting up a multisite network and I've gotten stuck on adding new sites. I am doing it as a test now for a larger project that I am working on. I have added two sub-directory sites through the super admin, which are /site1 and /site2. However when I go to those sites the page appears with errors and I cannot access the dashboard. What do I need to do to finish enabling these sub-directory websites? I know it doesn't need domain mapping, but do I need to add folders or edit files?

    Thank you,

    Dana

  2. No, you do not need to add folders or edit files. they show up automagically becasue they are virtual.

    If they aren't now we have to narrow that bit down.

    the page appears with errors

    what kind of errors? is it a white screen, a php error message, or the usual (and classic oft-asked-about) unstyled blog?

  3. indbiz
    Member
    Posted 3 years ago #

    Hi Andrea,

    Thank you for your reply, I really appreciate it.

    Here's the link to the test site and one sub-directory site:
    http://ms-subdirectory.glocalwebtech.com/site1/

    When I click on login it says: Not Found

    Apologies, but the page you requested could not be found. Perhaps searching will help.

    From what you mention, I think it's the unstyled blog look.

    Thank you,

    Dana

  4. Yep! :)

    Talk to your web host support, tell them you made htaccess changes and they are not being applied to the site.

  5. indbiz
    Member
    Posted 3 years ago #

    ah, ok.

    Thank you

  6. garywilliam
    Member
    Posted 3 years ago #

    Hello. I am new to this. I have spent many hours going through the support area and other but I can't find the answer to this. As with other similar posts my new subdirectory site in a newly installed WordPress network does not show a theme.

    I have conatacted my host and they have fixed my .htaccess file. Here is an email from them:
    There were some errors in your public_html/.htaccess file. I have fixed the file and your site and wp-admin loads correctly. You can view this file using the cPanel File Manager, selecting "Show hidden files", or an FTP application, also showing hidden (dot) files. Your original file was renamed as: public_html/.htaccess.20100808t

    That fixed alot but not the theme. I contacted them again and they told me to do this:

    That issue is due to WordPress using the URL to form a link for the CSS style sheet. In your page source, I see:

    <link rel="stylesheet" type="text/css" media="all" href="http://worldmemorialpost.com/fishandgamepost/wp-content/themes/twentyten/style.css" />

    Which should be:

    <link rel="stylesheet" type="text/css" media="all" href="http://worldmemorialpost.com/wp-content/themes/twentyten/style.css" />

    This is an internal issue with WordPress. Please refer to documentation and support at: http://www.wordpress.org

    I can access my site through an FTP but I don't know what folder or file to go to to make this change.

    Also, I am only using this website to practice doing what I want to do on my real future website. I don't want to make the same mistake again on that website and I am hoping you can let me how to do things correctly next time. Thank you.

  7. That issue is due to WordPress using the URL to form a link for the CSS style sheet. In your page source, I see:

    <link rel="stylesheet" type="text/css" media="all" href="http://worldmemorialpost.com/fishandgamepost/wp-content/themes/twentyten/style.css" />

    Which should be:

    <link rel="stylesheet" type="text/css" media="all" href="http://worldmemorialpost.com/wp-content/themes/twentyten/style.css" />

    This is an internal issue with WordPress. Please refer to documentation and support at: http://www.wordpress.org

    Did you tell your host you were using multisite with subfolder blogs? Because their information quoted above is incorrect. That's exactly how the link should appear.

    Go look at the ,htaccess file they put in there. Now compare it to what you have under Tools -> Network. Make sure it is exactly the same.

    The answer is the host has to force apache to read the htaccess file.

  8. garywilliam
    Member
    Posted 3 years ago #

    Thank you very much for your quick assistance. I sent the text of your reply to my host. I also sent this to them in my email.
    My Tools - > Network function doesn't appear in Word Press so I am unable to
    check what she said. I did find three .htaccess files. Two are the same,
    one is different.
    They are .htaccess, .htaccess.good, and .htaccess20100808t.

    I think I am now asking you to force apache to read the htaccess file?

    This was their reply.

    Thank you for contacting us. By default you are set up to use .htaccess (those files are basically a way to allow users control how the web server works on a shared server, so we use them extensively), so I am not sure how valid that information is. Earlier in this ticket you had asked mod_security to be turned off. Do you still need that? If so we can do it for you.

    Also, this is the .htaccess20100808t file they created for me:

    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]RewriteCond %{HTTP_HOST} ^worldfishandgamepost.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.worldfishandgamepost.com$
    RewriteRule ^/?$ "http\:\/\/www\.worldmemorialpost\.com\/worldfishandgamepost" [R=301,L]

    This is the code in the other two .htaccess files

    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^worldfishandgamepost.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.worldfishandgamepost.com$
    RewriteRule ^/?$ "http\:\/\/www\.worldmemorialpost\.com\/worldfishandgamepost" [R=301,L]
    
    #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]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    I am now at a loss as to what to do. As I said to my host, the "Tools" menu in Word Press does not offer me the network option so I am unable to check what you said to check. Do you have any more suggestions?
    Thank you very much.

  9. My Tools - > Network function doesn't appear in Word Press so I am unable to
    check what she said.

    You needed access to that menu to set up the network in the first place. How did you do that?

  10. garywilliam
    Member
    Posted 3 years ago #

    Yes, that's peculiar. I did create it at one point by putting
    define('WP_ALLOW_MULTISITE', true);
    in the wp-config.php file.
    The Word Press codex on "Create a Network" told me to delete it in Step 5 Section 2. Perhaps that disables the feature?

    The following code does exist in my wp-config.php file as I think it was generated for me during the process. There is a mention of "multisite." Also, I DO have a superadmin feature

    define('WP_DEBUG', false);
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'worldmemorialpost.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    
    /* That's all, stop editing! Happy blogging. */

    I have just noticed another bug showing up on the main site Word Press page http://www.worldmemorialpost.com
    I don't know if this helps?
    This says

    Go to the <snip>
    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/worldm14/public_html/wp-content/themes/thejournal/index.php on line 128

    If you think it is best to destroy all this somehow and start again, I am willing to do that. I am using this website account as practice for the account I wish to really use. I very much appreciate the time you have spent on this already.

  11. The Word Press codex on "Create a Network" told me to delete it in Step 5 Section 2. Perhaps that disables the feature?

    No, it just removes access to the menu.

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/worldm14/public_html/wp-content/themes/thejournal/index.php on line 128

    this is from your theme. switch to the default theme for now.

  12. garywilliam
    Member
    Posted 3 years ago #

    Yes, thanks that fixed that issue.
    I certainly don't expect endless free help from you and I don't want to drive you crazy with this issue. I think perhaps I should accept the fact that this stuff is a little beyond me and I should hire a professional to install things correctly on my real webpage and correct whatever I have screwed up on my practice webpage. I went to your website and it indicates your firm is quite tied up with clients at this point. If, however, you would be interested my mail is garywilliam at worldpagepost dot com. Or, if you wish, I could try to make contact through the website. Thank you again for everything. I hope you are having a nice weekend.

  13. lagoamedia
    Member
    Posted 3 years ago #

    Andrea you are impressively smart and helpful. I'd love to partner on something some day.

  14. skullkrusher
    Member
    Posted 3 years ago #

    Maybe I've found the thread I need -- I enabled network features two days ago. First problem I had was that the links broke in my main blog ... landing page loaded fine, but all other pages produced 404s. Switched from 'pretty permalinks' back to default & main blog functions fine again. Next problem -- new sites all produced 404s; new sites didn't show up in Super-admin admin, but did in some other tabs. I realized I had tweaked the wrong .htaccess file -- so I tweaked the right one.

    Now, new sites show up in super-admin admin, but every attempt to access the new blog loads the main page to my site, rather thatn anyting to do with wordpress.

    Should I uninstall WP & start over, or is there some why to fix this little mess?

  15. Yeah, something's royally messed up somewhere.

    If you picked subfolder, then a /blog/ got inserted into the permalinks on your main site. that's why they broke.

  16. skullkrusher
    Member
    Posted 3 years ago #

    Andrea:

    Thanks for the response -- it got so bad that I couldn't even get into cpanel! Thankfully I didn't have too much on my site, so I just had the Web host reset my site to the original defaults so I can start over. By the end of it all, I was thirty hours in and had a string of 33 e-mails. I'm going to save them as a grim reminder of what not to do.

    Thanks again -- hopefully you won't be hearing from me anytime soon;)

  17. If it helps, back when I started and it was wordpressmu and in alpha stage, it took me a whole month to get it installed and working. :)

  18. exodusfrom9to5
    Member
    Posted 3 years ago #

    Hi Andrea,

    I set up a subdirectory site, but it looks like this http://buy-online-reviews-cheap.com/painrelief/

    what would be the problem? Would that also be the .htaccess problem?

    Thanks
    Sai Kit

  19. Yes. 99% of the time, that error is an incorrect .htaccess setup.

  20. exodusfrom9to5
    Member
    Posted 3 years ago #

    Hi thanks for the quicky response Ipstenu

    I just checked and double checked the .htaccess and make sure it is the same as the codes that wordpress provided for subdirectories Multisite. It still doesn't work.

    Do you use blue host? Is it something to do with bluehost? But I heard that some people with bluehost were able to do Multisite subdirectories.

    Thanks
    SK

  21. Post your .htaccess here.

  22. exodusfrom9to5
    Member
    Posted 3 years ago #

    # BEGIN WordPress
    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).*) $1 [L]
    RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

  23. exodusfrom9to5
    Member
    Posted 3 years ago #

    BTW, earlier that day I installed the plugin WP Subdomain, which is supposed to convert category into subdomain, but I end up deleted it because it doesn't work.

    Would that lead to any problem I am experience right now?

  24. The ./htaccess is, indeed, correct. Is that your complete and total .htaccess? Sometimes the NON WordPress stuff goobers iot.

    The plugin may have jacked things up, though I'm not sure how. What other plugins are you running?

  25. your sub site looks fine to me.

  26. For me as well now (it was not when I first replied...). Could blue host be cachign htaccess like GoDaddy used to?

  27. exodusfrom9to5
    Member
    Posted 3 years ago #

    Hi,

    it seems to me that the sub site looks fine on Internet Explorer and Safari, but no Firefox. The main site is fine in every browser.

    So maybe the sub site and WPMU set up work fine after all, but somehow the firefox doesn't like it.

    So it isn't the problem that this thread is targeting I guess?

    Ok, so what would be the reason for the firefox tantrum?

    Thanks
    Sai Kit

  28. Flush your cache in Firefox.

Topic Closed

This topic has been closed to new replies.

About this Topic