After media replace, file location written wrong
-
Hmm, how to put this…
I’m using a Wp-Config.php ‘tweak’ to change the media folder location.
(define( ‘UPLOADS’, ‘/files’ );) Instead of default /wp-content/uploads/ I’ve changed it to /files/Because of this, after I upload a new media file, there seems to be a problem with the file’s new URL. The one referenced in the WP DB is wrong.
For example…
http://domain/files/my_image.jpgThe file is uploaded correctly, and I can see it in the FTP area, but any and all WP functions that use this image don’t see this URL. Instead, the file URL is:
http://domain/files//home/username/html/files/my_image.jpgIt’s pulling the environment URL and attaching that. IS there a way to fix this?
WordPress wp-config.php codex page: http://codex.ww.wp.xz.cn/Editing_wp-config.php#Moving_uploads_folder
The topic ‘After media replace, file location written wrong’ is closed to new replies.