WordPress.org

Ready to get started?Download WordPress

Forums

Duplicator
[resolved] wp-content path incorrect for removal operation (16 posts)

  1. Hassan
    Member
    Posted 1 year ago #

    I can't thank you enough for this plugin!

    My only (minor) complaint is that after I successfully migrate a site, Duplicator tells me to click a link to delete all of its files (installer.php, etc.). However, if I have modified my wp-content AND plugins folder paths, this doesn't work.

    Clicking on the delete link takes me to a URL inside Duplicator's folder. It automatically assumes that this file is inside mydomain.com/wp-content/plugins/duplicator/ which results in a 404 page; obviously because the actual path should be something like mydomain.com/custom-content-folder/custom-plugins-folder/duplicator/.

    I don't know if this is "by design" or if the wp-content URL is just hardcoded in the code, but it would be good if it could be fixed.

    Of course, I can just delete these stuff through FTP, but still.

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

  2. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Hassan,

    It currently is hard-coded I'll see if I can get the plugins path parameter passed... Good find, thxs!

  3. Hassan
    Member
    Posted 1 year ago #

    Thanks.

    Hey, since we're talking about custom content folder etc. there is another related thing. Of course, to change your default wp-content directory in the first place, you need to edit your wp-config.php with something like (assuming you're using WAMP on a local machine):

    define( 'WP_CONTENT_DIR', 'C:\wamp\www\my-site/custom-content' );
    define( 'WP_CONTENT_URL', 'http://localhost/my-site/custom-content' );

    Same thing goes for the plugins and the uploads folders. These URLs do not get changed/updates after migration. However, Duplicator does give me a notice in the final step saying that I better check my wp-config.php because it found mentions of these code snippets. Without changing those, the site breaks of course.

    Wouldn't it be better if Duplicator could update those paths to the new one automatically? It can write to wp-config.php, can't it?

  4. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Hassan,

    That is on the todo list as well. The problem I found with those particular variables is that some theme/plugin authors would dynamically set the value to all kinds of combinations:

    define( 'WP_CONTENT_DIR', $_SERVER['REMOTE'] . 'value')
    define( 'WP_CONTENT_DIR', $_SERVER['REMOTE'] . "value$var")
    define( 'WP_CONTENT_DIR', 'foobar')
    etc... etc...

    Writing a regex to capture so many different types probably isn't the way to go. What really need to happen is the creation of a state-machine that will cover all the scenarios. Once I get some time to really make that happen then I'll integrate that in as well, until then it will have to be a report item... But it is on the todo list :)

  5. Hassan
    Member
    Posted 1 year ago #

    Sounds good all in all. Awaiting the fix and the new features :)

  6. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    It may be a few release out, as the todo list is currently pretty long, but it will eventually get addressed... Know of any good PHP developers who want to help for free :)

  7. Hassan
    Member
    Posted 1 year ago #

    Is this plugin on Github?

  8. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    Not yet, but I plan to getting a Github account for it....

  9. Hassan
    Member
    Posted 1 year ago #

    Hi,

    have you fixed the hardcoded URL thingy with the latest v0.4.5? I read the changelog before updating, but saw no mention of such thing.

    However, I just migrated a site that also has custom content folders and the delete link did work! It took me to a link inside my wp-admin folder and showed all kinds of success messages :D

    Did you actually change this, or is it a "unintended success"?

  10. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Hassan,

    I did fix that issue I just forgot to add it to the changelog, sorry about that :)

  11. Hassan
    Member
    Posted 1 year ago #

    sorry about that?

    No man, THANK YOU for that; it was a pleasant surprise!

  12. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    LOL... Your welcome :)

  13. manuelkuhs
    Member
    Posted 11 months ago #

    lifeinthegrid,

    (thanks for such a fantastic plugin!)

    There is still an issue, at least when using Better WP Security to rename the wp-contents directory. Duplicator does NOT update the 2 lines that Better WP Security adds to the top of wp-config.php:

    define( 'WP_CONTENT_DIR', '/home/user/public_html/wp-content' );
    define( 'WP_CONTENT_URL', 'http://example.com/wp-content' );

    After manually updating these, it worked fine.

  14. Cory Lamle
    Member
    Plugin Author

    Posted 11 months ago #

    Hey manuelkuhs,

    Thanks for the feedback! Right now the those are reported in Step 3 of the installer report as Warnings. I hope to get those into future updates.

    Cheers~

  15. manuelkuhs
    Member
    Posted 10 months ago #

    Thanks lifeinthegrid - clearly I should have actually read the warnings!!

    Keep up the good stuff

  16. Cory Lamle
    Member
    Plugin Author

    Posted 10 months ago #

    No Problem...

    I plan to make the report a bit more visible in the future...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic