Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Never Settle

    (@neversettle)

    Hi @waldopepper – yes, it looks like the issue is that /sites/3 replacement getting doubled up somehow. Would you be able to run the Cloner with the debug log option enabled and send the log to us privately at [email protected] so we can take a look and get back to you here on what might be causing that?

    Thread Starter waldopepper

    (@waldopepper)

    Thanks ?? Emailed you the log and just waiting for the DNS to activate for the subdomain so I can test if this has happened again on the new test site.

    Thread Starter waldopepper

    (@waldopepper)

    Hi, the site is available now and the media issue is happening on this site too.

    It has saved a test file in:
    /wp-content/uploads/sites/5/sites/5/2020/03/test.jpg

    But is looking for:
    /wp-content/uploads/sites/5/2020/03/test.jpg

    Plugin Author Never Settle

    (@neversettle)

    Got the log, thanks! The plugin is performing the correct replacement (changing ‘/wp-content/uploads/’ to ‘/wp-content/uploads/sites/5/’, no double ‘sites/5’) so it looks like this is caused by a WP quirk with the upload_path option. Basically, if your upload_path option is blank, WP will calculate the default correctly and you’ll be good to go. If your upload_path is hardcoded in the DB on the parent/source site – for example, to wp-content/uploads, then the path replacements performed during cloning will update it to /wp-content/uploads/sites/X and it will clash with WP auto-appending the same sites/X value.

    So you can do one of two things:

    1. If you’re using the default wp-content/uploads folder, as it looks like you are, then you can just clear the upload_path option in the main wp_options table. Then, all future clones will be good to go with no further action.
    2. OR, each time you clone a site, you can clear or update the upload_path option in the new site’s options table (to remove the /sites/X/ part)

    Hope that helps – let us know if you that leaves any questions for you.

    Thread Starter waldopepper

    (@waldopepper)

    Hi again, thank you so much for your support. I just had to learn how to access my databases and how WordPress creates new WP_# tables for each new subsite!

    The upload_path wasn’t blank in the WordPress site it was cloned from, but it was set to this:
    [details removed]/public_html/wp-content/uploads

    In the cloned multisite it was this value:
    …/public_html/wp-content/uploads/sites/5

    So I changed it to:
    …/public_html/wp-content/uploads

    and media uploads are now working great! Is this something that might have broken anything else on the WP cloned site? Nothing else seems affected, I just want to be sure it’s all OK as this one will be used as a template for other sites. If it’s likely just to do with the Media Library URLs then I can just fix this each time if it happens again with further clones ??

    Plugin Author Never Settle

    (@neversettle)

    Great! Nothing else should have been affected – sounds like you’re on the right track and good to go ??

    I’ve been a satisfied user for years !

    But now I have this exact problem.

    As waldopepper says:

    The upload_path wasn’t blank in the WordPress site it was cloned from, but it was set to this:
    [details removed]/public_html/wp-content/uploads

    In the cloned multisite it was this value:
    …/public_html/wp-content/uploads/sites/5

    So I changed it to:
    …/public_html/wp-content/uploads

    I have my employees duplicating the sites, I can’t have them messing around in phpMyAdmin.

    Isn’t this an update you need to push for your plugin?
    You can not expect your users to log in to phpMyAdmin every time they clone a site.

    Any news on this ?

    Plugin Author Never Settle

    (@neversettle)

    Hey @pieterkmo – sorry for the delay, but circling back here to let you know that the latest version (4.0.8+) should resolve this issue with correct handling for hardcoded upload paths.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Image URLs on cloned subdomains’ is closed to new replies.