• Resolved apluskdesign

    (@apluskdesign)


    Hi,

    Great and easy plugin to use.

    Everything works well except the homepage, it throws up a 404 error. The rest of the cloned site works perfectly except that. I’ve tried changing the homepage to another page on the site but still get the 404 error, making me think it must be a setting, I’ve looked at the database, saved the permalinks on the cloned site and had my hosting company have a look without any luck.

    Do you have any idea what it could be? You can see the site here, it’s in development https://dev.silkysmoothbeauty.com/ and you can see a cloned site here https://dev.silkysmoothbeauty.com/ealing/ however you can still navigate round the cloned site if you go one of the pages (other than the homepage) https://dev.silkysmoothbeauty.com/ealing/manicures-pedicures/

    Any help would be appreciated.

    Allan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter apluskdesign

    (@apluskdesign)

    Just to give you an update my hosting company have resolved part of the issue, I’m having an issue uploading images to a newly cloned site, the upload image is just a broken link image

    below is the message I received from my hosting company,

    “The reason for the 404 is this part of your .htaccess:

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

    This says ‘if the request is for a file or a directory, do not continue (do not rewrite), serve the file as you normally would’. Since the ‘fulham’ directory does exist, the server looks for an index file inside, as it normally would, and if it can’t find one gives a 404.

    To make it work, I commented out the directory test.

    This probably isn’t a long term solution, as these rewrite rules are recommended by WordPress.

    Inside the ‘fulham’ directory is a ‘wp-content’ and inside that are uploads. Do you maybe have some uploader that may be causing this directory to be created (could it be the same thing that’s giving you the image upload problem?). If the recommended rewrite rules are to be used, the question needs answering why the directory exists, as this means the rewrite rules do not work as they’re meant to.”

    Thanks,

    Allan

    Plugin Author Never Settle

    (@neversettle)

    Usually these kind of problems are realated to the .htaccess file or an issue like your host was describing. We always recommend only using WP Multisite in subdomain mode. Subdirectory mode makes it much harder to troubleshoot issues like this and make sure everything works properly – especially because so many themes and plugins might not be multisite compatible and those issues are worse in subdirectory mode.

    Are you sure you have the right .htaccess for multisite subdirectory mode? That would be the first thing to check. https://codex.www.ads-software.com/htaccess

    Second thing to check – no subsite should be loading files from /site/wp-content/uploads/etc… Those files should be getting stored and loaded from /wp-content/uploads/sites/##/etc… if you look at the raw structure using FTP. Some upload plugins hijack the normal WP defaults, but it is especially important to use the normal WP default structure in Multisite.

    If you have the right htaccess file and you are having rewrite problems, then you need to scrub your plugins and site settings. Especially the settings in wp_##_options for the upload path and upload url path locations. You can go here per site:
    https://dev.silkysmoothbeauty.com/wp-admin/network/site-settings.php?id=##
    where ## is the site ID
    and do an on page search for upload
    Double-check those two fieds: upload path and upload url path. The should be blank. If anything is overriding that (like an image gallery plugin) then you need to update that plugins settings so that it doesn’t override that or use something else.

    If that’s not the cause, or doesn’t appear to be, something else could be dynamically causing the issue. If you find the source of the issue, also make sure you make the changes to the main site(s) you’re wanting to clone to, so that when you clone, the new site’s settings are correct.

    Cheers!

    Thread Starter apluskdesign

    (@apluskdesign)

    Thanks for the reply, I have worked out that the issue with the images, when the site was cloned the file path for uploads was changed to

    /home/silkysmoothbeaut/dev.silkysmoothbeauty.com/fulham/wp-content/uploads/sites/10

    When I think it should be

    /home/silkysmoothbeaut/dev.silkysmoothbeauty.com/fulham/wp-content/uploads/

    I have changed it to the correct file path above and I was able to upload images to the site or do you suggest I remove the file path and leave it blank as you suggest above.

    Allan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘404 Error on Homepage’ is closed to new replies.