WordPress.org

Ready to get started?Download WordPress

Forums

Duplicator
[resolved] Duplicating to a subdir with a similar name. (8 posts)

  1. MayerRubin
    Member
    Posted 1 year ago #

    I tried to duplicate a site to another subdir with a similar name so that I could experiment.

    Source: xyz.com/tbs
    Destination: xyz.com/tbs01

    and now I cannot access the new site because the URLs generated are incorrect (http://xyz.com/tbs0101/...).

    I think this is caused by the two search and replacements done by the installer.php process (but I could be wrong). If I look in installer-log.txt I see
    --------------------------------------
    GLOBAL DB-REPLACE
    --------------------------------------
    SEARCH1: 'http://xyz.com/tbs'
    REPLACE1: 'http://xyz.com/tbs01'
    SEARCH2: '/home/xyz/public_html/tbs/'
    REPLACE2: '/home/xyz/public_html/tbs01/'
    SCANNED: Tables:12 | Rows:2330 | Cells:14702
    UPDATED: Tables:1 | Rows:255 |Cells:276
    ERRORS: 0
    RUNTIME: 1.004200 sec

    Does the second replace cause a second "01" to be added?

    http://wordpress.org/extend/plugins/duplicator/

  2. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    It shouldn't create a "01". Did that happen when the directory was copied? Not 100% sure what the issue is to be honest. What version of the plugin are you using?

  3. MayerRubin
    Member
    Posted 1 year ago #

    How to quickly duplicate the problem:

    1. Create a WP site in a sub-directory.
    E.g. http://xyz.com/abc/

    2. Install and run Duplicator to create a package.

    3. Duplicate the website in another sub-directory.
    - Create another subdir with similar name ( e.g. http://xyz.com/abc01/ )
    - Copy the Installer and Package files to the new sub-dir.
    - Run the Installer program

    Old Settings
    URL: http://xyz.com/abc
    Path: /home/xyz/public_html/abc/

    New Settings
    URL: http://xyz.com/abc01/
    Path: /home/xyz/public_html/abc01/
    Title: My Duplicate WordPress Website

    4. Once completed click on the link for "Resave Permalinks".
    - URL of the link:
    http://xyz.com/tbs01/wp-admin/options-permalink.php

    - URL shown in browser after clicking on the link:
    http://xyz.com/abc0101/wp-login.php?redirect_to=http...

    Note that the sub-dir is now abc0101

    5. Another sign.
    - Click the link "Test Entire Site" and see a page without any formatting.
    - Examine the page's HTML source and look at the links, they show "abc0101".
    - For example:
    <link rel="stylesheet" type="text/css" media="all" href="http://xyz.com/abc0101/wp-content/themes/twentyeleven/style.css" />

    P.S. I'm using version 0.4.2 of the plugin, the latest on WP.org

  4. ashapiro75
    Member
    Posted 1 year ago #

    I'm experiencing the same issue so if your site was in a folder /site/
    and you want to duplicate it to the folder /siteduplicate/

    What happens is during the find and replace process, it seems like it's looping through twice.

    It goes and replaces /site/ with /siteduplicate/ then it replaces /siteduplicate/ with /siteduplicateduplicate/

    If you have a folder with a different name completely it seems to work.

    However I have an issue here, I am about to send this off to a client to install and right now I have it set up as so -

    http://www.mydomain.com/client/

    and it will be getting installed to http://www.client.com

    So the question is, will the find and replace f this all up with the folder name being in the domain name? I don't know, I duplicated the site already to a new folder that doesn't have any part of the client domain in it, so this should be a good workaround but there is still some bug in here that needs to be fixed.

  5. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    Hey guys when I get some free time I'll see if I can track down this bug... Thxs for the detailed example!

  6. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    If you can give the latest hotfix version a try it may have your fixes for the issue you're seeing. The very latest version can be found by following these instructions:

    -> Browse to http://wordpress.org/extend/plugins/duplicator/developers/
    -> Look for the section "Other Versions"
    -> Click on "Development Version" and download the zip plugin file
    -> Uninstall your current version and install this one

    Let me know if this solves your issue...

    Thanks

  7. MayerRubin
    Member
    Posted 1 year ago #

    That's it! Thanks for the fix, works perfectly.

  8. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    Excellent! Thanks for the detailed example!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic