Root Relative URLs
[resolved] attachment guid link in "wp_post" (6 posts)

  1. Huijun
    Posted 3 years ago #


    This tool helps me a lot. All page and post use relative address. But for the attachment, it seems not work. In table "wp_posts", attachment guid link is still absolute link.

    Could you give me some advise about this problem.




  2. MarcusPope
    Plugin Author

    Posted 3 years ago #

    @Huijun - Yeah, I can absolutely look into this problem and release a patch. I'll try to reproduce the problem today and get back with you on when I can deliver a solution.


  3. Huijun
    Posted 3 years ago #


    Thank you Marcus, you are so effective.
    I am trying to find a solution too, but I modify the /wp-admin/includes/medis.php
    If you could realise this function in the plugin, it should be better for users.

    Have a good day.

  4. MarcusPope
    Plugin Author

    Posted 3 years ago #

    @Huijun - Ok, I think I have a fix for this issue. I'll release 1.7 here shortly.

    But first, are you sure you added the following lines to the wp-config.php file?

    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
    define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
    define('WP_CONTENT_URL', '/wp-content');

    I just want to confirm because if WP_CONTENT_URL is not defined properly, it could also cause this problem.

    Another cause is if you have specified an absolute url in Admin > Settings > Media : Uploading Files. Removing this and using the default value would also fix the problem (but won't be necessary in version 1.7 of my plugin.)

    Regardless, I can intercept the URL and adjust it to root relative. If after verifying the define statements above are in your wp-config and after upgrading to 1.7 you still have problems then let me know and I'll work with you further on this issue.

    I should have 1.7 released in a half hour or so.

  5. MarcusPope
    Plugin Author

    Posted 3 years ago #

    resolved in version 1.7

  6. Huijun
    Posted 3 years ago #


    Bravo. After a weekend, this is a surprise for me. As you said, I found out that this problem was caused by the configuration of upload media.

    And I tried the new version, it works perfect.

    Thanks for your help.

    Have a good day. :)


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Root Relative URLs
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.