Support » Fixing WordPress » What To Fill In “Full URL path to files” in WP Original Media Path

  • decentguy49


    I had recently decided to move my all media files on sub domain like and for this I had installed plugin WP Original Media Path, but I am not sure what to fill in it.

    I tried add but its not of worth and it not working.

    I am not on cPanel, rather I am using VestaCP.

    So can you tell me what to fill it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Although, it is not recommended, here are the steps which might work for you.

    1. You need to create a subdomain and configure its DNS settings.
    2. Now, you need to migrate all the media to subdomain (“/wp-content/uploads/”) folder. (You can use FTP for this task.)
    3. Now the important task to log in to PHPMyAdmin and change the upload folder under wp-options table of the database.

    upload_path————-directory root for your subdomain
    upload_url_path———actual URL path for your subdomain

    For example:

    upload_path———- /home/server_root/publich_html/img

    4. If your website already has some images than you need to change there live URLs. to do this you need to run this command in phpmyadmin command tab.
    UPDATE wp_posts SET post_content = REPLACE(post_content,'URL of current media folder','URL of new media folder')

    Here :
    URL of current media folder –
    URL of new media folder –

    5. Now, you can remove the old upload folder by deleting it from ftp.

    6. Now you also need to change the URL from searching index and to do this you need to redirect the URL in the htaccess file.

    RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$
    RewriteRule ^wp\-content\/uploads\/?(.*)$ "http\:\/\/subdomain\.yourdomain\.com\/$1" [R=301,L]

    Follow these above steps and your media folder will be moved successfully.

    Neha Unadkat



    The easiest if you want to migrate the URL is to do it in 3 simple steps:

    STEP 1
    Change the field with the new URL.

    STEP 2
    Move the contents of your old uploads folder to the location of the new URL. For example, my old folder URL is and I now want the images to be; After changing the field in the options like this:, I move the contents of the folder to the, so I allow dynamic functions to continue to find the media files in your new folder.

    STEP 3
    Now we need to change, the old image calls for example that is in the content of WordPress articles. First you have to back up your database, because the operation can be damaging and I can not be held responsible. It is necessary to modify in SQL by a simple Search> Replace.
    For More detail Please visit Below link

    Thank you



    Hi I tried both of your methods but they are not working, dont forget VestaCP treats any subdomain as separate domain name and its path is also out of domains directory like-

    Main Domain path – /home/user/web/
    Subdomain Path – /home/user/web/

    Neha Unadkat


    You can put this filter in your function file to rewrite the url.

    function website_image_rewrite_url( $rewrite ) {
    $rewrite = str_replace( ” . get_site_url() . ‘/wp-content/uploads/’, ‘new url path/wp-content/uploads/’, $rewrite );
    return $rewrite;
    add_filter(‘wp_get_attachment_url’, ‘website_image_rewrite_url’);

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘What To Fill In “Full URL path to files” in WP Original Media Path’ is closed to new replies.