When I assign a location the file moves there just fine, but the “File URL” changes to
https://domain.org/wp-content/uploads//var/www/vhosts/domain.org/httpdocs/pdf/document-name.pdf
That is the URL used on inserting into a post.
Thank you for your work
]]>Hello,
Just trying out the plugin and it looks good.
I have spotted an issue with the code whereby the default location is wrong – at least on my setup.
Replace:
// prefix with default location
$default_upload_path = str_replace( ABSPATH, ‘/’, WP_CONTENT_DIR );
With:
// prefix with default location
$upload_dir = wp_upload_dir();
$default_upload_path = str_replace( ABSPATH, ‘/’, $upload_dir[‘basedir’] );
Cheers ??
]]>I had Relocate Upload 0.23 and everything was working fine until I updated WP to version 4.7.3, since that very moment all the images that were previously uploaded are no longer shown in the media library. Any new image is shown properly, but all images uploaded before that day are not shown in the media library.
I have upgraded RU to version 0.24.1 and WP to version 4.7.4, but keeps the same problem.
]]>I created 1 folder and started adding media, and everything was working fine. Then I added a second folder, and suddenly nothing was working. All the previous images were broken links and anything I added to my new folder broke. Looking through ftp, the images are in the correct folder. But when I examine the URL, it is missing a slash. “https://domain-name/wp-content/uploads2016/pics/2016.jpg” There needs to be a slash between uploads and 2016. I’ve double checked and I’ve specified the correct URL. After playing around with it, I can sometimes get it to display the image again (even though the URL is still missing a slash.) Any idea what would be causing this or how to fix it?
This plugin was exactly what I was looking for, but I can’t use it if it won’t be dependable. Thanks for your help!
]]>Seems the authors didn’t really have time so I’ve spent a little on this plugin and fixed some issues. It works on WP 4.6 and on multisite.
Get the new version from https://wpdev.net/plugins/relocate-upload
]]>Hi, I’m using last build from WordPress, 4.5.2, and I can’t fing the screen to manage the custom folders to files uploaded…
]]>We have been using this plugin for maybe two years to relocate uploaded documents to protected folders.
Suddenly, the links for all relocated documents have changed in the media library, but the documents have not moved.
The new links show: wp-content/uploads//home/ourhostusername/public_html/filefolder/ourprotectedfolder/nameofdocument.
The protected folder is not in the uploads folder in wp-content.
Our old links, which used to be correct, are now being appended in front with incorrect information. And I can’t account for how ourhostname and the rest of the path are suddenly showing up either.
This is not happening for images that are not relocated through this plugin.
This is happening for new uploaded documents that we try to relocate, not just the ones already in there.
Any help would be appreciated.
]]>I’ve posted feedback about this as well as other people, a fix is needed to make this compatible with 4.3.1.
]]>relocate function doesn’t work anymore…
[function.rename]: No such file or directory in /users/user6541/sites/my-website.com/wp-content/plugins/relocate-upload/relocate-upload.php on line 64
FAIL: Unknown error occurred.
On moving a file I get:
Warning: rename(2015/09/lj6p.pdf,/homepages/24/d147901974/htdocs/_blauweiss/wp/wp-content/uploads/fussballkurier/lj6p.pdf): No such file or directory in /homepages/24/d147901974/htdocs/_blauweiss/wp/wp-content/plugins/relocate-upload/relocate-upload.php on line 64
It seems that the source path of the rename command is only relative to my uploads folder. Destination path is OK.
]]>Hi Author,
I was getting “FAIL: Unknown error occurred.” and i have done a quick fix as mentioned below
//$attachment_path = get_post_meta($id, "_wp_attached_file", true);
$attachment_path = get_attached_file($id);
Will there be any future upgrade compatible for 4.3? Let me know thanks
]]>I have been using this plugin for some time and have been really happy with it. I run a website with many images and so I use the plugin to organize my photos into specific folders after uploading them.
Since version 0.24 this plugin has been giving me trouble. At first it made the URL for the images really long, for example it would be something like https://website.com/images/location/website.com/images/location/filename.jpg which basically broke all of the links on my site.
I then switched back to v0.23 and though some images have been fixed many of them are currently being shown as being under the default folder when they were actually moved to a different folder. When I use the dropdown and try to switch it to the correct folder I get the error “FAIL: move will overwrite an existing file” which is frustrating because it means my proper file IS in the folder I want but relocate upload won’t let me re-link the file URL.
Wondering if there is any fix coming?
]]>Hi,
Once I deactivate the plugin, ( even older versions ), all my image paths is broken.
How can I safely deactivate Relocate Upload, and keep all images in tact?
Thank you
]]>Hi,
Since I upgrade to V0.24, my image path is broken:
https://www.sophiaclinic.com/upmedia/uploads//usr/www/users/sophixyhsf/upmedia/news/sophia-clinic-21.jpg
instead of
https://www.sophiaclinic.com/upmedia/news/sophia-clinic-21.jpg
]]>
Hi guys, thanks a lot for your plugin. I’ve had an issue with version 4.2.4 and 4.3 – I kept receiving that message “FAIL: Unknown error occurred” so after playing a little with the code, I have found a temporary fix to make it work (tho the thumbnail isn’t moved) to move the file from one directory to another.
On line 51 I have commented out $attachment_path = get_post_meta($id, "_wp_attached_file", true)
with $attachment_path = get_attached_file($id)
If you can make the plugin work again, would be great!
Thanks,
Ciprian
WPML Media fix: Better update by guid field for all records created by WPML, imho.
//old code
// $attachment_record = &$wpdb->get_row($wpdb->prepare("UPDATE $wpdb->posts SET guid='%s' WHERE ID = %d ", $new_guid, $id));
//new code
$attachment_record = &$wpdb->get_row($wpdb->prepare("UPDATE $wpdb->posts SET guid='%s' WHERE guid = %s ", $new_guid, $attachment_guid));
]]>
I get the following warnings when I change the folder of the uploaded media…
Warning: Illegal string offset 'sizes' in /home3/home1081/public_html/wp-content/plugins/relocate-upload/relocate-upload.php on line 56
Warning: Cannot modify header information - headers already sent by (output started at /home3/home1081/public_html/wp-content/plugins/relocate-upload/relocate-upload.php:56) in /home3/home1081/public_html/wp-content/plugins/relocate-upload/relocate-upload.php on line 73
Warning: Cannot modify header information - headers already sent by (output started at /home3/home1081/public_html/wp-content/plugins/relocate-upload/relocate-upload.php:56) in /home3/home1081/public_html/wp-content/plugins/relocate-upload/relocate-upload.php on line 74
]]>
Hi,
I have been using this plugin for several years. While working on a redesign for the site it’s installed on, I noticed that media uploads not directed to one of the custom upload folders I created have been going to random years and months.
For example, most recent uploads went to the October folder for 2010.
In the development site for the update, recent media files uploaded ended up in January 2014.
I don’t know how long this has been happening but it’s kind of a mess.
Can I fix this, what should I look for? Thanks for your help.
]]>hello
is there any option to select / move more than one image at once during adding files to library?
thx in advance
Marcin
Hello ??
Is there an easy fix for this notice?
Best,
Dariusz.
Hi,
I want to thank you for your plugin beacouse it solved a problem of mine.
Anyway it broke my db ??
So, I needed to create a script to recover the integrity of my db.
I’d like to share with you this script so you can use it to enforce your plugin.
Let me know if you like the idea and how I can give you my script.
Bye,
Danilo
I have been very frustrated with this plugin lately. I am not enough of a developer to know what is wrong now that WordPress has recently done some major updates, as I have not had time to maintain my various WordPress site(s) regularly for about 2 years.
Due to the fact that I can no longer rely on the features this plugin introduced, I will have to completely redesign upload functionality for several sites.
I hated the way WordPress automatically (dis)organized my media uploads, so I am now in search of a solution, once again, to keep files organized HOW I WANT THEM, rather than how WordPress vomits them all into a messy pile.
]]>Hi,
I use WP All Import to import a large volume of products on a regular basis. I can hook into custom fields with that plugin which enables me to set the page options according to my theme. I was wondering if there is any way to hook into the relocate upload custom fields to have it automatically select the folder for the imported image during the import process?
Failing this – is there anyway to bulk change the folder for images? I have far too many to do on an individual basis.
Appreciate your advice or thoughts on this.
Many thanks,
Leanne
I have read that in the past there were some security and vulnerability issues with this plugin. Have they been resolved? Are there any updates in the works for this plugin or is no one working with it anymore?
]]>image not Remove in
when removing media library
will be possible to remove in future releases?
—————————————
and no work filter directory
remove in media library – yes
remove image in path directory – no ??
reupload image – FAIL: move will overwrite an existing file ?? ( maybe function rename ? or button overwrite
Hi supportteam,
is your WP-PlugIn well working together with the newest WordPress releases 3.8.x? Some known isuess or all is working fine?
Thanks very much for a short replace!
Best Regards
I’m using Relocate Upload 0.22. I’m trying to get it running on my test server, which is IIS7 on Vista. My server contains more than one site, each a subfolder under C:\inetpub\wwwroot
. Let’s call one I’m trying to set it up on is C:\inetpub\wwwroot\mysite
.
When I first installed the plugin, the settings page said:
Paths are relative to your blog's root folder: C:\inetpub\wwwroot
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(C:\inetpub\wwwrootc:\inetpub\wwwroot\mysite/wp-content/uploads) is not within the allowed path(s): (C:\inetpub\wwwroot;C:\Windows\Temp) in c:\inetpub\wwwroot\mysite\wp-content\plugins\relocate-upload\relocate-upload.php on line 247
Warning: mkdir() [function.mkdir]: open_basedir restriction in effect. File(C:\inetpub\wwwrootc:) is not within the allowed path(s): (C:\inetpub\wwwroot;C:\Windows\Temp) in c:\inetpub\wwwroot\mysite\wp-content\plugins\relocate-upload\relocate-upload.php on line 247
I edited relocate-upload.php line 12 to be:
define('SERVER_DOC_ROOT', $GLOBALS['_SERVER']['DOCUMENT_ROOT'].'/mysite/');
The result:
Paths are relative to your blog's root folder: C:\inetpub\wwwroot/gbotd/
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(C:\inetpub\wwwroot/gbotd/c:\inetpub\wwwroot\gbotd/wp-content/uploads) is not within the allowed path(s): (C:\inetpub\wwwroot;C:\Windows\Temp) in c:\inetpub\wwwroot\gbotd\wp-content\plugins\relocate-upload\relocate-upload.php on line 251
Warning: mkdir() [function.mkdir]: Invalid argument in c:\inetpub\wwwroot\gbotd\wp-content\plugins\relocate-upload\relocate-upload.php on line 251
Line 251 is:
f(!file_exists($new_dir)) mkdir( $new_dir, 0755, true );
— it’s slightly different from the original because I’ve added some comments as I’m working.
Looking at the first error message, I decided to try changing line 248:
$new_dir = SERVER_DOC_ROOT . replace_month_year( $ru_folder['path'], date("Y-m") );
to:
$new_dir = replace_month_year( $ru_folder['path'], date("Y-m") );
Now I get:
Paths are relative to your blog's root folder: C:\inetpub\wwwroot/gbotd/
Warning: mkdir() [function.mkdir]: open_basedir restriction in effect. File() is not within the allowed path(s): (C:\inetpub\wwwroot;C:\Windows\Temp) in c:\inetpub\wwwroot\mysite\wp-content\plugins\relocate-upload\relocate-upload.php on line 251
new location
The Default location form seems to be displaying properly.
So, some of this seems to be related to an open_basedir problem — particularly frustrating because it seems to be turned off in php.ini.
But as for the rest, it looks to me as though something similar to what’s described in the comment at the end of the program is happening:
// thing is if you have an absolute path to your file, WP will give you an url like
// https://domain.co.uk/path_to/wp-content/uploads//home/useraccount/public_html/another_path_to/media/media_item.gif
// note the double /
//
// as SERVER_DOC_ROOT = /home/useraccount/public_html
//
// we do a search for (https://.*?/).*?/SERVER_DOC_ROOT/ and replace with \1
but the fix isn’t working.
— Red Owl Web Design
]]>When I set a product to be sold individually, and that product is already on the cart, when i try to add to cart again, instead of redirecting me to the cart, it gives me a page not found and i get this debug message:
Notice: Undefined index: ru_index in /home/somethum/public_html/transend/wp-content/plugins/relocate-upload/relocate-upload.php on line 147
]]>To help me better understand your wants and needs, please answer the questions below. This will help me to know what features you as the user needs from this plugin. Thanks!
Q1) Do you have relocate paths outside of wp-content/uploads?
Q2) Do you have relocate paths off of your root folder?
Q3) Do you use the “Store uploads in this folder” field from the Settings->Media page?
Q4) Do you use the “Organize my uploads into month- and year-based folders” option from the Settings->Media page?
Q5) Do you use any version of WordPress older than 3.3 (if so what version)?
Q6) Other Comments/Requests?
]]>I just installed and is working great so far. I wonder, though, if there is an easy way to change the name and location of the default location? I have my config set to a folder outside of the root install but the plugin doesn’t seem to read the config file for changes. I would also like to change the name of this location to “blog” instead of “default location” so I won’t have to duplicate an entry.
https://www.ads-software.com/extend/plugins/relocate-upload/
]]>