[WP_REMOTE_GET] Demo download - no header/menu of footer settings


I just downloaded and installed your Be theme. When going to the the "Be Theme Demo Data" page for downloading a demo site I get an error saying 

WordPress function wp_remote_get() test failed. Looks like your server is not fully compatible with WordPress. Contact your hosting provider.
Status code: 401

Downloading still seems to work though. But when downloading some example sites I don't get header/menu setting or footer settings. Is this because of the wp_remote_get error or is it the expected behaviour? 

BR, Johan


  • Hi Johan,

    you get this message because your server is incompatible with wp_remote_get() function. And because of that, some settings may do not import probably. In such case, you should contact with your admin to sort it or import missing options manually.

  • Hi, thanks for your quick reply. One follow up question: 

    Do you know what needs to be fixed/enabled on the hosting side to make wp_remote_get() working? 

    Or if there are any method to troubleshoot why it is not working? I have both ftp and shell access at my host and I am fairly computer/linux savvy :) 

    BR, Johan
  • We don't know because we are not server experts unfortunately. Above, we gave you the link to this function so you can check how it works exactly and what could be the reason. We really would like to know which library is missing or what has been limited but we are simply not admins. We would be grateful if you can share with us if you will find the solution on your server. Otherwise, you need to import settings manually.
  • OK, I understand that. 

    I have contacted my hosting provider and will try to find an aswer. If I do I will post it here. Meanwhile I tested your instructions for manual import and they worked fine. 

    BR, Johan
  • We would be more than happy if you can share with us if you find an answer.
  • I checked with my hosting provider and posted a question on the wordpress-support forum. PHP curl is enabled at the host so there is no reason wp_remote_get should not work. 

    From both parties I just got the information that the error code 401 from wp_remote_get indicates that there is some problem with user authorization or access to the file wp_remote_get wants to retrieve. 

    Next I checked the code in /betheme/functions/importer/import.php. As fas as I can see the code for importing demo data is importing settings that are in my local theme folder in .../betheme/functions/importer/demo. 

    Starting on line 425 in the import.php are the test for wp_remote_get-function. This does a "test-get" of the file: 
    $test_file = LIBS_URI . '/importer/demo/menu.txt'
    $response = wp_remote_get( $test_file );

    This test reports an error for me. Thought that maybe it was a folder/file permission thing - or some bad configuration of .htaccess. So  I tested accessing this file from a web browser. That worked. 

    I am running the child-theme so I also tested activating the main theme. But the error in wp_remote_get is still there. 

    So I still can not figure out why I can't access these files from your within "BeTheme Import Demo data" in wordpress. 

    BR, Johan
  • I solved it!! The error is coming from the fact that I put the site behind HTTP Basic Authentication while it is under development. 

    The call to wp_remote_get in your importer.php is not taking this into account. Changing the wp_remote_get call to something like this makes it work: 

    $username = "xxxxxxx";
    $password = "xxxxxxx";
    $args = array(
        'headers' => array(
      'Authorization' => 'Basic ' . base64_encode( $username . ':' . $password )

    $response = wp_remote_get( $test_file, $args );

    BR, Johan
  • Thanks for your explanation @jklinge. We will consider additional username and password fields then.
  • try add

    add_filter( 'http_api_transports', function() { return array( 'streams' ); });

    in the last row of wp-config.php then save it..
  • Hi,

    I have the same problem, my hosting provider has said to me that it´s not his fault. 

    Can anybody help me please, I´m new in wordpress and my skills are not very good, is there any possibility for a simple solution ?


  • edited March 2016
    The exact problem is:

    Error: Couldn't resolve host 
  • I´ve tried the solution from @Yogaprassetya but it did´t worked 
  • @Fabianneshati They simply lied you because this problem is on their side of course if above solution does not work in your case. This has nothing to theme because as you know, for over 30000 customers it works fine.
  • Hi
    I've the same issue but it's resolved, the problem came when the Htaccess file was activated (special htaccess file with .htpassword to protect site).

    I hope that will help someone else
  • I am having the same issue and my hosting provider is Rackspace and they said its not on their side and it must be something with the theme.
  • @Velmaperales Your provider didn't told you the truth because it may does not work if loopbacks are not supported on your server. This issue has nothing to theme and is related with limits on server side only.
  • Do you already know which setting on server is wrong? Because I use a root server and the same problem...
  • having the same issue, in my case the error was in the host configuration. the vhost should match the hostname, and map to the server IP.
    in Linux:
    - check webserver VHost
    - check server Hostname
    - check /etc/hosts 

    I hope that will help someone else
  • hk75 ,Thanks so much for help 
    it does work!!!
    i check below
    - check server Hostname

  • edited June 2016
    Just FYI, I ran into the same problem as jklinge. My hosting provider has password protection on by default, and I got the "WordPress function wp_remote_get() test failed" message. Once I removed the password, it worked.
  • edited July 2016
    Hi Guys

    I have just had the same problem and receiving the following error.....

    WordPress function wp_remote_get() test failed. Looks like your server is not fully compatible with WordPress. Contact your hosting provider.
    Error: couldn't connect to host

    I have spoke to 123 reg who have advised the following...

    The cURL loopback connections are indeed blocked and I'm afraid that we cannot lift this limitation for your shared hosting as this is a server side setting.

    However, the loopback connections are used to connect your website with your website. As you need to connect to a different server to import the data, this is not blocked and the website can connect via cURL to another server.

    I am really sorry, however this is not something we can assist you with. If you do not have experience with such issues, it may be best that you contact a web developer specialised in WordPress to assist you further.

    They have advised they cant help me, can anyone please advise what I need to do?

  • @nicholasandnick123 Yes, sure. If your host is unable to help you, switch to better hosting service where people would be able to help and their servers would be fully compatible with Wordpress.
  • haha thanks for the advice.

    Can you provide any host's that will support this theme?
  • We use OVH but we also had many customers who use hosting services like GoDaddy, MediaTemple and many other that are fully compatible with Wordpress.
  • hk75 thanks my apache had server hostname commented out
  • Hi pros,

    I have the problem when I try to import demo data:

    BeTheme Import Demo Data

    Before starting the import you need to install all plugins that you want to use.
    If you are planning to use the shop, please also remember about WooCommerce plugin.

    WordPress function wp_remote_get() test failed. Looks like your server is not fully compatible with WordPress. Contact your hosting provider.
    Error: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received

    I installed the wordpress an betheme in a separate folder because I want to setup the new side before I want to exchange the web in the main folder.

    Mainfolder is http:// www .....com/web/
    wordpress and betheme in http:// www....com/web/zzz/ 

    Anybody knows to advice a newbie to solve the problem?
    Txs in advance.
  • @ThorstenvdB You need to contact with your admin/hosting provider because the issue is on server slde.

  • AH01071: Got error 'PHP message: PHP Fatal error: Cannot use object of type WP_Error
     as array in /var/www/vhosts/tcsnatos.com/httpdocs/wp-content/
    themes/betheme/functions/importer/import.php on line 509\n',
    referer: http://tpsantos.com/wp-admin/themes.php?page=mfn_import&tgmpa-dismiss=dismiss_admin_notices&_wpnonce=

    I have the same error,  in my case It is not a server issue as I have two sites that I use with this plugin. 
    Would anyone know how this could be fixed I tried previous suggestions, It didnt work.

    Thanks in advance. :)
  • @thiago123 To check this, we need WP dashboard and FTP access and to send them us please use contact form on the right side at http://themeforest.net/user/muffingroup#contact. Please don’t forget to let us know what for the access is.
Sign In or Register to comment.