Support » Plugin: WP Original Media Path » How to automatically change media paths for OLD media?

  • Resolved morespinach


    Love the simplicity of this plugin, but it doesn’t seem to be doing what I expect.

    I want my media to be uploaded into a custom folder, which then needs to become a subdomain. Let’s say my website is

    The folder is:
    subdomain (which translates into home/xyz/www/wp/subdomain)

    The URL path should be: (I have the CDN setup, and this domain works fine)

    Yet, despite this plugin, the file paths for my media are still etc. What am I missing?

    If I manually change the path in the browser to “”, then the image works. So the uploading is working fine, but the file path conversion is not automatic.

    Thanks for any pointers!

Viewing 1 replies (of 1 total)
  • Plugin Author RVOLA


    Hello @ morespinach

    Indeed, the plugin modifies the behavior of URL for the media to new media.
    If you want it to be retroactive, it will have to modify the URL of the media in the SQL + media calls in the content articles.

    /!\ Warning!
    The operations described are at your own risk and should be adapted to your environment. I can not be held responsible for breaking your database.

    Please backup your database before!

    1 / Set the WP plugins Original Media Path with the correct URL and path of the file

    2 / log in to your phpMyAdmin to execute the following SQL commands

    3 / operation changes guided media:

    UPDATE XX_posts
    SET guid = REPLACE (guid, '', '');
    WHERE post_type = 'attachment'

    4 / operation changes the URL in the content of the articles:

    UPDATE XX_posts
    SET post_content = REPLACE (post_content, '',';

    Normally if you have taken precautions and ADAPTED codes to your configuration, the old media have changed accordingly.

    good luck

Viewing 1 replies (of 1 total)
  • The topic ‘How to automatically change media paths for OLD media?’ is closed to new replies.