WordPress Toolkit Hotlinking Protection doesn't work correctly with mod_pagespeed

Follow

Comments

5 comments

  • Avatar
    Ericbeck

    I have something to add to this.  When using Elementor in WP.  I cloned site1.com to site2.com (different subscriptions).  After cloning I got this hotlinking error on site2.com.  Solution: 

    1. from site2 wp-content/ directory: grep -R site1.com *

    2.  found in uploads/elementor/css/ directory, .css files containing the old site1.com links, also found site.com links/urls in maintenance.php in the main wp-content directory

    3. for each css file in /uploads/elementor/css/ directory 

    # sed -i 's/site1.com/site2.com/g' NameOfFile.css

    (this searches and replaces inline, so be careful -- make backups of the css files first if you have none)

    4. do the same for any other file you found with the old site domain name in links/references

    * Note: we tried using the Velvet Blues Plugin to search and replace URLs but came up with an error and no changes, so I suspect there is something to do with Elementor that prevents this, but Velvet Blues should have done the maintenance.php file so that is a point to note.

    At any rate, after using sed to search and replace all those instances of site1.com in the newly cloned wp site at site2.com everything was correct.

    (of course you replace site1.com and site2.com with your real domain names)

    Hope this helps someone.

    0
    Comment actions Permalink
  • Avatar
    Daniel Cambría

    Waiting for a fix. Thanks!

    0
    Comment actions Permalink
  • Avatar
    Wes Dunn

    Does this block Google and all other search engines showing images in search as well Marc? I would assume it does, any way around that? 

    0
    Comment actions Permalink
  • Avatar
    Daria Gavrilova

    Hello @Wes Dunn,

    Thank you for your question.

    The issue, which is described in the article, can be met only if images are uploaded into httpdocs/wp-content/uploads folder path.
    In all other cases, it should work as expected.

    0
    Comment actions Permalink
  • Avatar
    Ericbeck

    Oops ... not sure this post should be on this question, as it has nothing to do with mod-pagespeed, but I ended up reading this thread searching for solution for my problem after cloning.  There might be a more pertinent question to post this solution to.

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request