I would try changing your line in wp-config.php to
define( 'UPLOADS', 'media/blog/files' ); // where docker is mounted
Ie, get rid of the first /.
Let me know if this works.
EDIT
If you can’t change the definition of UPLOADS you could strip out the forward slash out with code. Try changing your code to this…
$upload_dir['path'] = str_replace( $upload_dir['basedir'], ltrim( UPLOADS, "https://wordpress.stackexchange.com/"), upload_dir['path'] );
Related Posts:
- How to Arrange PHP Files to Allow for Multiple Types of Pages?
- Permission functions within wordpress
- How to set and use global variables? Or why not to use them at all
- How to deprecate a function used in a plugin?
- How to manually fix the WordPress gallery code using PHP in functions.php?
- How to make a image-size selected by default in Media upload – WP v3.5
- What is This esc_html_e() i wordpress php?
- Error Warning: Declaration of description_walker::start_el after PHP upgrade [duplicate]
- How to Add Image to WordPress RSS-Feed with no Plug-in?
- Function to return true if current page has child pages
- How do I change/modify the_post_thumbnail(); html output?
- Mega Menu Walker
- start_lvl Ignored in Custom walker_nav_menu
- Enforcing password complexity
- PHP code in page template vs functions
- Apply class to every paragraph that holds image?
- Remove “Insert from URL” link in Media upload – WP 3.5
- static variable loop not working in WordPress
- Cleaning up WordPress to improve performance?
- Displaying Logged-In User Name in WordPress Menu
- Hide main div if wp_nav_menu is empty
- Proper use of Output Buffer
- List of all theme customizer control types?
- Autoloading in Child Theme
- Does My Child-Theme Functions.php Need if{die} Security In It? [duplicate]
- Modify previous and next text from pagination links
- Allowed memory size of 268435456 bytes exhausted (tried to allocate 7146491840906359738 bytes)
- How to add a class to the attachment images
- Need help setting default setting value for radio button in theme customizer
- How to call a function only once (global variable scope)
- Multiple is_page() in page.php
- Should I write a PHP function in home.php?
- Removing Default Gutenberg Blocks, But Keeping Reusable Block Functionality?
- Edit tag cloud widget number
- adding a filter to a shortcode?
- username_exists() function can’t be access without logging in
- Customize default settings on new sites on multisite
- Set media upload attachment link to none and hide it in WP v3.5
- How can I modify the permalink via a filter?
- How to draw media details for Isotope gallery using Photoswipe
- How to call a PHP function from Javascript in WordPress
- How to automatically apply woocommerce product title to all product images alt tags?
- How to store the_title() into a variable to reutrn the value, not just echo it
- exclude multiple terms using get_terms() function
- Create a global variable for use in all templates
- Is it possible to disable a function of a parent theme?
- Add Useragent to the body class?
- How do I make my function add variables/values to the $post object?
- Hide old attachments from wp media library
- How to override an unpluggable parent theme function?
- PHP – redirect https to http and www to non-www
- function_exists call in function.php
- How to register images uploaded via FTP in media library?
- Fatal error: Call to undefined function plugin_dir_path()
- Switching wp_get_sites to get_sites
- Check if a menu is empty?
- wp_set_object_terms and arrays
- WordPress Infinite Scroll without using any plugin
- Namespacing WordPress project according to FIG standards
- Build a content and excerpt grid loop with paging and options for # of posts
- Shortcode putting html such as
- How to preserve PHP modifications while upgrading WordPress?
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- Debugging an error: wp_enqueue_style was called incorrectly
- How to log out everywhere else, destroy all sessions “all other devices”?
- how to get permalink structure with php
- Inserting Gravity Form checkbox values into Advanced Custom Fields [closed]
- Change the footer text on the login page
- How to remove a metabox from menu editor page?
- How do I remove a require_once admin panel from the parent theme from the child theme functions.php?
- Should the value of core functions be escaped before outputting?
- How to get the registered sidebar’s name by its id?
- Remove wp-mediaelement.css from wp_head
- How do I get the author’s page url from their ID?
- Why is my custom meta box input not saving
- add_filter to post-gallery and remove all ‘s?
- Dynamic URL to reference custom PHP files
- How to correct schedule my event weekly with wp_schedule_event()
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- Calculate percentage of post by category
- Can i check if user is doing any ajax request?
- the_post_thumbnail() based on the Post ID
- How to get the original price of the product in woocommerce?
- Displaying post per day
- Dynamically change feature image in customiser
- How to overwrite youtube embed?
- One button to change all settings in theme customizer?
- Rewriting search and pagination base
- Woocommerce auto cancel On-Hold after X days
- Check if page parent has certain template
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- class=”parent” for wp_list_pages?
- Calling a method from functions.php on a click of a button
- Enqueue Javascript Correctly for 3.5
- Shortcode created to check language not works
- How to redirect users to custom lostpassword page?
- Change comments form title on a page by page basis
- Allow authors to post only in categories they create in WordPress
- Creating wordpress user registration form
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out