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
- Error Warning: Declaration of description_walker::start_el after PHP upgrade [duplicate]
- Displaying Logged-In User Name in WordPress Menu
- Set media upload attachment link to none and hide it in WP v3.5
- Fatal error: Call to undefined function plugin_dir_path()
- Switching wp_get_sites to get_sites
- One button to change all settings in theme customizer?
- Add custom image sizes to media uploader
- How to add default images into theme customizer image control?
- Is $hook a global variable in WordPress
- Successful or Error Message after running mysql code in functions.php
- How can one utilize a variable as a callback function name for add_settings_field
- Custom Logo URL | Help me print the URL of the custom logo I inserted into my theme
- Include a php file from functions.php only to homepage
- Shortcode content output but not in correct place
- How to restrict page access to logged-in users?
- Count the number of times the search form template gets included on a page
- PHP code inside shortcodes
- Get first URL from post content
- Setting custom canonical urls
- Trigger popup in a php if/else statement
- Setting a cookie upon specific URL visit
- get post based on category chosen in drop down – The ajax method
- how to make separate field in wordpress user_data_
- How to output a PHP file values by shortcode?
- Set the background to a default image if there isn’t a specified “featured image”
- Calling directories to load in wordpress
- Logged in user ID as post ID
- WordPress Access allowed to fewer pages till user logs in
- Use DOMDocument with ob_start breaks my HTML code
- different id for same element visual composer [closed]
- Tax query in pre_get_posts not working
- trigger html cleanup for all posts
- 3 Slashes appear after Apostrophe in custom fields after updating product-site
- Validation algorithm in checkout field
- Catchable fatal error: Object of class stdClass could not be converted to string after WP 4.7
- Trying to retrieve post meta
- Need help enqueueing webfonts
- Add class to group inner container
- Error call_user_func_array() expects parameter 1 to be a valid callback when using image_size_names_choose
- Illegal string offset in PHP function
- How to remove ?p= from wordpress short links
- Displaying text if post was within 5 hours
- Adding a tag_ID column into Categories inside the admin dashboard?
- Need php code’s output to display underneath a Divi Module
- WP_Query | IF within $args array | Help me only add specific arguments if the argument is not blank
- How to make function appear in sentence?
- How to define a variable already defined in a plugin function?
- woocommerce specific quantities for product
- My website is not showing Footer section
- woocommerce related product title length
- Custom query vars filters problem with pagination
- Automatically Add Page Links to Nav Menu
- blank white page when post/update/change option etc
- Query for user roles
- Use SCSSPHP to compile Theme Customizer Values into .SCSS files ready to compile to CSS
- Must filter functions receive all arguments passed to them?
- How to Display a List of Child Pages For a Parent Page in WordPress
- Displaying Slider in Front Page (home) using Customizr Theme
- How to add PHP pagination to wordpress
- Is there a way to create a “copy post” link?
- Taxonomy term description with style, only if the description exists?
- Use of antispambot with $curauth->email
- Restrict post to current user in postmeta
- How to change the author box selection on a post to a custom taxonomy
- How to send a php var to jQuery Ajax call with two different file
- copy fields value to another field
- not outputting medium size image URL
- posts_per_page displays only 2 posts instead of 4 posts
- Get parent category name when only child category is applied to a product
- Can an AJAX callback function access a PHP variable which was defined during initial page load?
- Adding product permalink on admin order page throwing error
- Before & After Content – After Content directly below Before Content when using require_once
- How to redirect (301) trashed post to it’s parent taxonomy TERM ARCHIVE instead of 404 page
- Detect what link user clicks and Redirect to a specific page for logged in users only
- How to call WordPress PHP file using external js file
- How fix error in the WordPress loop?
- How do I prevent a folder from reappearing in my home directory?
- use system script advertising in wordpress multisite
- Use WP_Query Data In Cookie
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- Styling admin page rows in order of importance (checkboxes)
- Insert wordpress tags below posts via functions.php
- Help with my first Metabox helper class
- ISOTOPE – Missing/Invalid Arguement Get Terms
- Showing all post from all post type in admin backstage
- Pagination not displaying
- My title is showing after the shortcode
- Load a Header in wordpress
- Trouble figuring out how to get my button to submit comment
- Setting WooCommerce currency programmatically
- Masking external links with internal link for member-only
- Shortcode to include PHP file, pass various parameters to include?
- Why can’t I include echo inside a variable? [closed]
- Adding multiple conditional tags in a function?
- Why a class property becomes empty?
- Hide category by tag
- How do I stylize selected comments?
- add_rewrite_rule image from /images/site2/favicon.ico to /favico.ico