Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: URL of media files

Discussion in 'Misc WordPress Requests' started by mateusgetulio, Nov 21, 2017.

  1. mateusgetulio


    Reply To: URL of media files, by mateusgetulio

    This “/site/x” folder setup is an automatic setup from WordPress Multisite.
    You can try a workaround with the following steps.
    1- Make a backup of your functions.php file.
    2- Edit it and place this code:

    function wpse_147750_upload_dir( $dirs ) {
    $dirs[‘baseurl’] = network_site_url( ‘/wp-content/uploads’ );
    $dirs[‘basedir’] = ABSPATH . ‘wp-content/uploads’;
    $dirs[‘path’] = $dirs[‘basedir’] . $dirs[‘subdir’];
    $dirs[‘url’] = $dirs[‘baseurl’] . $dirs[‘subdir’];

    return $dirs;

    add_filter( ‘upload_dir’, ‘wpse_147750_upload_dir’ );

    After that the new upload files will get back to the old pattern.
    Try those and tell me about the result.

    Reply To: URL of media files

Share This Page

Monarch Social Sharing Plugin