Hi Hassan,
It currently is hard-coded I’ll see if I can get the plugins path parameter passed… Good find, thxs!
Thread Starter
Hassan
(@hassanhamm)
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?
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 🙂
Thread Starter
Hassan
(@hassanhamm)
Sounds good all in all. Awaiting the fix and the new features 🙂
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 🙂
Thread Starter
Hassan
(@hassanhamm)
Is this plugin on Github?
Not yet, but I plan to getting a Github account for it….
Thread Starter
Hassan
(@hassanhamm)
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 😀
Did you actually change this, or is it a “unintended success”?
Hey Hassan,
I did fix that issue I just forgot to add it to the changelog, sorry about that 🙂
Thread Starter
Hassan
(@hassanhamm)
sorry about that?
No man, THANK YOU for that; it was a pleasant surprise!
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.
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~
Thanks lifeinthegrid – clearly I should have actually read the warnings!!
Keep up the good stuff
No Problem…
I plan to make the report a bit more visible in the future…