• I’ve got a very odd problem and I am new to multisite.

    We’ve setup a site with multisite, with one sub-site. For some reason every 1-2 days in the early hours of the morning (GMT), the sub-site will disappear from the front end.

    All that’s left is the tree directory (parent directory page) in its place.
    The admin for the missing site is still available via multisite so it just seems that the front end of the new site disappears and I have to do a recovery to get it back.

    After that it works again for a day or two and then dissappears.

    Any ideas?

Viewing 15 replies - 1 through 15 (of 20 total)
  • This is indeed odd. Yikes!

    Do you mean that if you had on your site a page like https://example.com/subsite/page, and you try to visit it, you get a 404 error? Do you also get a 404 error when you go to https://example.com/page (a page on the main site)?

    When you go into the backend to see your page, what happens if you click on “View Page”?

    Is this a live site, or one you’re still building?

    Are you set up with subdirectory or subdomain sites?

    Thread Starter chaten

    (@chaten)

    Hello ancawonka,

    Thanks for the reply. To answer your questions:

    No, I don’t get a 404 error. When visiting https://example.com/subsite/page
    I just get an empty browser with “Parent directory”

    When I go into the backend and click view page/site it comes up with the same as above.

    This is a live site and its set up with subdirectories.

    > No, I don’t get a 404 error. When visiting https://example.com/subsite/page
    I just get an empty browser with “Parent directory”

    This doesnt make sense and there is not enough information to go on. My guess is either you have a caching plugin that is not functioning properly or you did not configure your subsite correctly. For example if I went to any random non-existing url on my multisite, I get the WP 404 error.

    Thanks for the reply.

    As @jkhongusc suggests, you may have a caching plugin set up, which refreshes itself at that hour. Do you know if you’re runnning W3TotalCache, WP SuperCache, or something like that, designed to speed up your site?

    If you do, try turning it off (deactivate on all sites, or network deactivate it) and see if the issue comes up again.

    Once we track down what is causing this, you’ll be more equipped to troubleshoot it.

    If you don’t find any kind of caching stuff set up, you might talk to your hosting provider about this issue – if you’re using managed WordPress hosting there might be something they’ve set up that does the caching, which isn’t properly refreshing.

    Thread Starter chaten

    (@chaten)

    Hello jkhongusc and ancawonka,

    Thanks for the responses.

    I don’t have any caching plugins installed.

    What I have noticed is that if I work on the site then it tends to disappear the next day. When I don’t work on the site, it stays up.

    The host has said that its likely a database issue as no files are actually disappearing however when I do a recovery on the site, I’m only recovering files and not the DB in order to get it up and running again.

    I have done a DB repair to see if that makes any difference.

    Sorry, I’ve not provided the actual url in case this problem is a security leak of some sort. I’d rather not have the site hacked is theres a loop hole in security but I’m happy to give more info if it helps.

    Do you have any backup plugins that try to save every action you make? Are you using Jetpack? Or maybe, do you have a plugin like “staticpress” that tries to create static copies of pages on your site?

    make sure you check in your /wp-content/mu-plugins directory to see any plugins that are automatically loaded.

    If you are seeing a “parent directory” screen, this would indicate that your webserver is trying to list the contents of a directory, which means it’s files, not database stuff, that’s causing this.

    Next time this happens, FTP into your site and see if you have an empty directory w/ that name anywhere under your webroot.

    Thread Starter chaten

    (@chaten)

    Hello Ancawonka,

    No backup plugins installed. No Jetpack installed. Staticpress or nothing similar installed.

    The actual folder https://example.com/subsite/ does not actually exist so there wouldn’t be any files in that directory to load except for the subsite itself which loads from the root directory.

    I’ve done a database repair on Friday and since then it seems to have fixed the problem.

    Thread Starter chaten

    (@chaten)

    Update:

    We’re still having problems with the above so the DB repair did not fix the issue but I have managed to investigate further and found some other results.

    From what I can see, the site is actually not disappearing. if i visit https://example.com/subsite/ i get the parent directory but if i visit https://example.com/subsite/page then thos pages do show.

    However when i click on two particular links from the main site https://example.com which lead to https://example.com/subsite/ then cause the above problem (leads to parent directory).

    The links from the mainsite are correct but I get either a parent directory page, a 404 page, or a page saying https://example.com redirected you too many times.

    Could this then be a problem with the .htaccess file?

    > Could this then be a problem with the .htaccess file?

    Pretty certain. Do you want to show us the content and the location? It typically resides at the root of your installation.

    Thread Starter chaten

    (@chaten)

    Hello jkhongusc,

    I’ve looked into the multisite redirect loop problem which seems to be pretty common but none of the solutions so far have worked. This includes changes to the htaccess file, config file, database.

    This is the htaccess file i’m using:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [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]

    Your .htaccess looks standard. This is the other possibility. If you are getting a directory listing at https://example.com/subsite/, do you have a subfolder called ‘subsite’?

    Thread Starter chaten

    (@chaten)

    Yes, I have a subfolder at https://example.com/subsite/
    The folder is empty, no files whatsoever

    > The folder is empty, no files whatsoever
    That’s the problem! Delete the folder and your problems will be solved =)

    This is the reason, the rules

    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
     RewriteCond %{REQUEST_FILENAME} -d
     RewriteRule ^ – [L]
    

    Specifically the second rule says if there is a directory stop WordPress from serving the request. That means the web server serves the request. The directory is empty so the web server is configured to show the directory listing.

    Thread Starter chaten

    (@chaten)

    ?? Thank you so much. I’ll try that now and see how i get on.

    Thanks again.

    Thread Starter chaten

    (@chaten)

    Unfortunately that did not solve the problem. This time though the problem occurred during the day whilst I was working on the site.

    Any more ideas?

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Subsite disappearing’ is closed to new replies.