WordPress: Download failed. A valid URL was not provided.

Some days ago I’ve updated my WordPress to the new 3.8 version.
For storing my themes and plugins I’ve set up a repository on a virtual machine running on the same virtual network.

This was working perfectly until WordPress 3.5, but since 3.6 the developers added a new security feature that denies access to repository with a local ip, for example 172.[16-31].x.x as in my case, but also, 10.x.x.x, 192.168.x.x.

When I try to install or update a theme or plugin I’ve got this error:

Downloading install package from http://put.your-repository-domain-here.co/my/path/to/my/downloadโ€ฆ

Download failed. A valid URL was not provided.

To add your repository to the allowed list you can simply add these lines to the very end of your wp-config.php.

  • Be advise that the php open tag may not be required.
  • Check also that the given code is placed after: require_once(ABSPATH . 'wp-settings.php');
  • Don’t mind the warning: /* That's all, stop editing! Happy blogging. */
  • phranck

    Thank you Emanuele! This saved my day.

  • daronspence

    Thanks! This saved my bacon. Especially useful when testing theme/plugin updates with two sites both running on one instance of VVV.

  • Jeremy

    I’ve been banging my head against this error all day, but your post finally made me see the light. Thanks!

    • You’re absolutely welcome!!! ๐Ÿ™‚
      Please do not abuse your head… it’s one of the most valuable piece you have ๐Ÿ˜›


  • netyou

    Bless you for your time spent! This saved me!

    • You’re welcome! ๐Ÿ™‚

      I’m starting to think that if someone could count the hours spent on this issue, we can fill a pretty huge stack, maybe overflowing it ๐Ÿ˜€


  • Thank you @Emanuele Tessore You saved my day too! ๐Ÿ™‚

  • gelform

    Thank you! I lost days because this isn’t written about anywhere. It’s the missing piece of this tutorial. I’m going to add a link to this post in the comments. https://code.tutsplus.com/tutorials/a-guide-to-the-wordpress-http-api-automatic-plugin-updates–wp-25181

  • nick

    Thanks!!! It helps my out

  • Borislava

    Thank you!!!!

  • Benjamin

    I don’t quite understand by pository domain. I have to put in a url in that space where it says put.your-repository-domain-here.com?? When I get this error message its when I try and install the required plugins that woozone needs before woozone plugin will work properly.

    • I honestly don’t get you…
      You need to change that string with the URL for the pluginthemes repository…

      • Benjamin

        Actually I found out this was totally different from my problem. I was trying to install the woozone plugin. Woozone requires a bunch of other plugins and they wouldn’t install for me thus giving me the URL error. You are the only one online who had some sort of solution but it turns out it’s way off base from my actual problem. Well I had both the parent and child “Kindom Woo themes” installed and that was the issue. I only had to activate the parent theme alone which fixed the error.