A good way to create Logs in PHP

A good way to create Logs in PHP

Hello everyone :)

Today we’re gonna go over Logging in PHP as nested Class.

With the introduction of PHP5 we now get the opportunity to use PHP as an Object Oriented Programming Language. What this means is, and in a very short way, that we can now have a more reliable, faster and safer way to program in PHP.

OO programming brings abstraction, encapsulation, inheritance, and polymorphism so, therefore, PHP also does.

  • Abstraction – Allows the programmer to declare abstract methods that can be instantiated in a class and declared by an object.
  • Encapsulation – Gives us the ability to protect which ever data, inside a class, by using protected methods like private classes ou functions.
  • Inheritance – We can now create tree like class structure where the lower levels on the tree are childes of the level above. (in this Logging example we’re going to be using this methodology)
  • Polymorphism – Using this feature we’re able to declare a given class and use his children methods even tho we have declared parent class without the need to redeclare them.

First of all we’re going to go over the basic structure of our Log class.

interface iLogs
 public function insereLog($entrada,$tipo); 

We declared an interface. This way the application that will be calling this class is able to read its available content without the need to directly access the class internally.

Note: Methods that are declared on the interface need to be equal to the ones declared inside the class itself (either method name or number of arguments required). Otherwise you’ll get a fatal error from PHP.

Next step takes us to declaration of the class itself.

class Logs implements iLogs
 const VERBOSE = false;
 // Max size for log compression -> 1MB
 private static $max_size = 1024000;
 // Folder in your root where the logs will be stored
 private static $cwd = 'logs/';

As you can see, we’re telling class Logs that it should implement interface iLogs that we previously declared.

Every class needs a constructor and a destructor. Basically what should and should not be done when we initialize the class.

 public function __construct() {
  if (!defined('LOG_FILE_ADMIN')){
  if (!defined('LOG_FILE_CLIENTES')){
  if (!defined('LOG_FILE_WEBSERVICES')){
 public function __destruct() {

__construct and __destruct use “__” since they are native to PHP5 and are automatically called when a class is instantiated.

When the class is built we want to create some constants used throughout the class and we want to check if everything is according to the file structure required.
We also use self to address the actual instantiated class and :: in place of -> because we’ll be calling them in static mode (no data can be changed).

Our destruct class is empty since there is nothing to be done when the class is destroyed.

Note: Normally you can use this function for a DB connection and destruct can close the connection.

 private function preparaDirectorias() {
  if(!is_dir("logs")) {
    throw new Exception ("It was no possible to create 'logs' dir"); 
  if(!is_dir(self::$cwd."logs_arquivo")) {
    throw new Exception ("It was no possible to create 'logs_arquivo' dir");

We attempt to check if folder structure is properly created, if not we create it.

 private function preparaLogs() {
  if (!file_exists(self::$cwd.LOG_FILE_ADMIN)) { 
   if(!fopen(self::$cwd.LOG_FILE_ADMIN , 'w'))
    throw new Exception("It was not possible to create '".LOG_FILE_ADMIN );
  if(filesize(self::$cwd.LOG_FILE_ADMIN) > self::$max_size) {
   if(!fopen(self::$cwd.LOG_FILE_ADMIN , 'w'))
    throw new Exception("It was not possible to create '".LOG_FILE_ADMIN );
  if (!file_exists(self::$cwd.LOG_FILE_CLIENTES )) { 
   if(!fopen(self::$cwd.LOG_FILE_CLIENTES , 'w'))
    throw new Exception("It was not possible to create '".LOG_FILE_CLIENTES );
  if(filesize(self::$cwd.LOG_FILE_CLIENTES) > self::$max_size) {
   if(!fopen(self::$cwd.LOG_FILE_CLIENTES , 'w'))
    throw new Exception("It was not possible to create '".LOG_FILE_CLIENTES );
  if (!file_exists(self::$cwd.LOG_FILE_WEBSERVICES)) { 
   if(!fopen(self::$cwd.LOG_FILE_WEBSERVICES, 'w'))
    throw new Exception("It was not possible to create '".LOG_FILE_WEBSERVICES);
  if(filesize(self::$cwd.LOG_FILE_WEBSERVICES) > self::$max_size) {
   if(!fopen(self::$cwd.LOG_FILE_WEBSERVICES, 'w'))
    throw new Exception("It was not possible to create '".LOG_FILE_WEBSERVICES);

We’re going to check the size of our logs. If they exceed $max_size then we compress them and create a new and fresh log file.

 private function compressbz2($file_name) {
  $file_pointer = fopen(self::$cwd.$file_name, "r");
  //Opens the file in readonly,
  //Check for permissions
  $file_read = fread($file_pointer, filesize(self::$cwd.$file_name));
  //Reads the content
  //Closes the file
  $actual = date("-Ymd-His");
  $filename = $file_name.$actual.".bz2";
  //Opens compression file for writing purpose
  $bz = bzopen(self::$cwd.'logs_arquivo/'.$filename, "w");
  //Writes the file
  bzwrite($bz, $file_read);
  //Closes the file

A simple function for compressing files. I will not go into a lot of detail on this section. If you find it to be useful please contact me and I’ll make a post about file compression.

And finally we’re going to create the method that we call when using this class to add a log.

Note: As you probably noticed (or not :P ) all other methods (except construct and destruct) are private and therefore can only be called from within the class itself.

 public function insereLog($entrada,$tipo) {
  if($tipo == 1) {
   $fp = fopen(self::$cwd.LOG_FILE_ADMIN , 'a+');
    throw new Exception("It was not possible to create '".LOG_FILE_ADMIN );
   else {
    fwrite($fp,'['.date("Y/m/d - H:i:s").'] '.$entrada."n");
     echo $entrada."n";
  elseif($tipo == 2) {
   $fp = fopen(self::$cwd.LOG_FILE_CLIENTES , 'a+');
    throw new Exception("It was not possible to create '".LOG_FILE_CLIENTES );
   else {
    fwrite($fp,'['.date("Y/m/d - H:i:s").'] '.$entrada."n");
     echo $entrada."n";
  elseif($tipo == 3) {
   $fp = fopen(self::$cwd.LOG_FILE_WEBSERVICES , 'a+');
    throw new Exception("It was not possible to create '".LOG_FILE_WEBSERVICES );
   else {
    fwrite($fp,'['.date("Y/m/d - H:i:s").'] '.$entrada."n");
     echo $entrada."n";

This logging class supports logs for 3 different types of systems; frontoffice (clients), backoffice (administrations) and webservices.

The way you call this function can be done in different ways, in this case, I’ll go over the Inheritance feature we talked before.

Imagine you have a class, lets say, foo

class foo {
 public function hello() {
  // I bet you never seen this before!!! hehe ^_^
  echo 'Hello World';

What we can do is…

//Logs.class.php is your Log class we just did
require_once 'Logs.class.php';

class foo extends Logs {
 public function hello() {
  // I bet you never seen this before!!! hehe ^_^
  echo 'Hello World';
  Logs::insereLog("Mom, I think i just said Hello World. Log it please, thank you!",1);

And voila, there you go :) your very own log system out of the box.

Feel free to report me any mistakes, suggestions or doubts you might have.

Have fun and be != be# {‘run remotly’ && Get['4_free'];}

401 Responses to “A good way to create Logs in PHP”

  1. Aayushi says:

    Fantastic !!!

    This is what I was looking for. And it is so easy.

    Thanks a lot.

  2. Glad you liked it and it was helpful Aayushi.

  3. Nice menu! Still a shame IE has to have some javascript to function properly.. Hopefully soon we can just use css with the :hover functionality.

    To place it over any kind of flash movie you have to publish your flash movie with wmode=transparant in and it will fix any html layers on top of the flash..

  4. Justin says:

    Hi Jose, so this is exactly what I am looking for for my wine blog as I use a 5 star rating system. Can use this in blogger? If so, how?

  5. Hello Justin.

    This is purely HTML/CSS based coding. I’m not 100% familiar with how blogger works but if you’re able to edit your HTML code you should be able to add this.

    First thing you need to do is to upload the images to some place on your server, for this you can use the regular image upload when editing/adding a post.
    After getting the image link add the CSS coding to you template header (it should be next to the tags).

    Finally just add the HTML part to where ever you want in your post.

    Let me know if you need anything else.

  6. Tom says:

    Hi JP,

    thanks a bunch for this code! I needed to make some changes to it since I’m using WP e-Commerce 3.7.6 and some of the text constants were replaced by WP’s __ function. And for some reason I had to add a global $wpdb; to wpsc_purchaselog_details_SKU().

    Anyway, this is a much needed modification. Thanks again!


    • Hello Tom,

      Thank you for the kind words. I’ve been having a lot of requests from a lot of people regarding this feature.

      Yes some changes might be needed to adapt this to different versions. Let me know if you require and further assistance :)

  7. Tom says:

    Actually, there is one thing I need help on. I’m coding some extra stuff for my WPEC site and now I’m trying to get the variation SKU with a single SQL statement. I’ve been wrecking my head as SQL really isn’t my strong suit.

    But I figure there must be a way to get from the purchase id to the cart id to the variations of the products in the cart all the way down to the variation SKU. But whatever I do, I get back too many rows.

    Do you by any chance have an idea how to achieve this with an SQL query?

    • Hello again Tom,

      We can do this but not in 1 single SQL statement, because field all_variation_ids is comma separated. If we would work with the SQL code we might be able to do this but would represent a break on the Database atomicity.

      However I can provide you with 2 SQL statements that you can easily use to create a PHP functions to return a given product sku.

      Store in an array the result of this SQL statement: SELECT `variation_id` FROM `wp_wpsc_variation_assoc` WHERE `type` IN (‘product’) AND `associated_id` = ’4′ ORDER BY `variation_id` ASC

      Now lets say you have the array called $variation_array. You’ll have to do a second SQL as follows:

      “SELECT `sku` FROM `wp_wpsc_variation_properties` WHERE `id` IN (SELECT DISTINCT `priceandstock_id` FROM `wp_wpsc_variation_combinations` WHERE `value_id` IN (SELECT `value_id` FROM `wp_wpsc_variation_values_assoc` WHERE `product_id` IN (’4′) AND `variation_id` IN ( SELECT `variation_id` FROM `wp_wpsc_variation_assoc` WHERE `type` IN (‘product’) AND `associated_id` = ’4′ ) AND `visible` IN (’1′)) AND `product_id` IN (’4′) AND `all_variation_ids` LIKE ‘”.implode(“,”,$variation_array).”‘)”

      This will return the exact SKU for the given variation.

      You just need to provide the product_id, in this case, it’s 4.

      Let me know if this fits your needs.

  8. Tom says:

    I guess that’s why I was having such a hard time wrapping my head around this. I thought there had to be a way to get this done in a single query, but I kept hitting a roadblock with the variation_id and value_id fields.

    I’ll give your solution a try, definitely looks good.

    Thanks again!

  9. Erika says:

    WOW… this fix looks like it should do the trick but MAN what a mess. I am not a programmer so this may be a test of my ability to follow directions!

  10. Erika says:

    Jose – I implemented everything as is listed above in your post. Upon ‘save’ and then trying to view the backend or the frontend the site was gone. Everything was blank. Ideas? I’m using WP Version 2.9.2 & WPEC Version

  11. Hello Erika,

    Lets try to see what is going wrong.

    First thing we must do is see why the page is blank. It’s probably due to a PHP error and since WP omits all error we need to turn debug on WP.

    To do this open the wp-config.php file and add this line:

    define(‘WP_DEBUG’, true);

    After that open your blog and check what error it’s outputting.

    Looking forward to earing from you.

  12. John says:

    Hey José,

    I’ve been trying to apply the changes to different versions (i.e. and but I get a feeling I’m either missing something or I’m not applying your changes properly. I keep getting syntax errors, SKUs don’t save on variations, etc.

    Would it be possible for you to take the latest version, apply the changes yourself, and make them available for download? That way, if someone who’s not all that experienced is doing something wrong, we can rule out newbie editing mistakes.

    Thank you.


    • Hello John,

      I can certainly make the adaptations for different versions. I know that for some versions the syntax changes a bit.
      Please sent me the two files I mention on the guide, by email, to me and I’ll gladly make the changes and provide them here on the post.

      Best regards.

  13. John says:

    Hey José,

    I tried sending you an email but for some reason, Yahoo couldn’t find your domain at joseairosa@core-creations.pt.

    Rather, I’ve uploaded the files for at:



  14. Hello again John,

    I’ve added the changes to the files. I didn’t have a chance to test them so please give me some feedback.


  15. John says:

    Hey José,

    The modifications worked great. I’m in the process of integrating it into my site. Thanks!


  16. I’m glad it worked! :)

  17. Milos says:

    Great addition to the module

    One thing I noticed is when you add a variation and enter the SKU number, when saving the product, the first save doesn’t store the SKU number in the database, and the SKU field is empty, so you have to enter it again and save. I modified the insert query in the update_variation_values function to include ‘{$variation_sku}’ in the inserted fields.

    $wpdb->query(“INSERT INTO `”.WPSC_TABLE_VARIATION_PROPERTIES.”` ( `product_id` , `stock`, `price`, `weight`, `weight_unit`, `file`, `sku` ) VALUES (‘{$product_id}’, ‘{$variation_stock}’, ‘{$variation_price}’, ‘{$variation_weight}’, ‘{$variation_weight_unit}’, ‘{$variation_file}’, ‘{$variation_sku}’);”);

  18. danilo says:


    I used your script for a personal website. It’s fantastic!

    I have a problem with jpg images. If you want to resize and crop the image is too big I generate an image with edges of blacks. you can generate the jpg image with white borders?

    I hope you can help me! Thank you!

    • Hello danilo,

      I’m glad you liked it.

      I’ve tried for a while to do the same thing you’re asking but, as far as I’ve researched, there are some limitations regarding PHP GD.

      What you can do is play a bit with the “$cropPercent = .5;” and see if you find a more suitable output for your needs.

      I’ll take a look at the script and see if I can get it to work :)

      Best regards!

  19. danilo says:

    Thanks for your fast response!

    I will like you suggested …. thank you again!

    Best regards!

    p.s: sorry for my English but I know very little!

  20. h1brd says:

    It’s working great :) Already up and running @ http://scarletbits.com/ , hope to see it more out there as it consist of a simple (for the user) yet amazingly powerful improvement, especially now with the page speed ‘fact’. Excellent work!

  21. Patrick says:

    i just installed your plugin and tried to add an subdomain for parallelisation.
    I first created a Subdomain which links to an folder with 755 permission.
    Next I gone to the WP admin panel, to parallel loading system an tried to add the subdomain.
    When I press “Add Sub-Domain”, the following error occures:
    “I was unable to find your http server root”

    I unfortunately have no idea, what i could do so solve the problem. Could you maybe give me some support?

    Is it important to link the subdomain to a special directory? maybe the same like the wp install folder?

    • Hello Patrick,

      Could you please tell me what kind of administration system you’re running on? cPanel, Plesk, DirectAdmin…

      Also, can you tell me, if you know, what your wordpress full path is? – You can check this very easily by creating a new file on your computer, call it getcwd.php and add the following content to it:

      < ?php echo getcwd(); ?>

      Upload that file your wordpress root (this is the place where wp-admin, wp-content and wp-include folders.

      After uploading it go to your browser and put the link to your blog (example: http://example.com/blog/ or http://example.com/) and add getcwd.php at the end, so you get something like this: http://example.com/blog/getcwd.php or http://example.com/getcwd.php

      Let me know what you see in that page.

      This happens because the plugin will try to automatically detect your server root in accordance to most common file systems. If it doesn’t find the path it will have to be added manually. I’m in the process of adding this functionality.

      Thank you for your feedback and looking forward to ear from you again.

  22. Viki says:

    I use GoDaddy for Domain Management and MediaTemple as the Hosting provider. So, I need to create a sub-domain using GoDaddy, right?

    GoDaddy gives the option to create sub-domain and asks us to forward it to some url. In this case I forwarded it to the main domain.

    Now when I add sub-domain to the Parallel loading system , all it says is the sub-domain cannot be verified, click “here” to check it. When I click on it, it takes me to the blogs homepage. When I go back to the plugin dashboard, it doesn’t show any sub-domains that have been added.

    So, I’m going wrong somewhere. Could you kindly advice, what I can do to set this up properly.


    • Hello Viki,

      If you’re using MediaTemple you need to create your sub-domain directly with MediaTemple. If you’re using one of the Grid solution I’m not sure whether you have access to server control panel or if MediaTemple provides that directly on your Grid Control Panel.

      GoDaddy only allows for you to create domain redirections, which, in this case does not work.

      I’m going to check on MediaTemple KnowledgeBase and get back to you as soon as I know more.

      Thank you.

    • Hello again Viki,

      I have checked with MediaTemple and you need to add sub-domains using the grid-service control painel (if you have grid-service).

      If you have any other higher solution you should have Plesk installed and that is the place to add them.

      Let me know how it goes.

  23. Xbitz says:

    i just installed the plugin and the subdomain health is returning HTTP/1.0 404 Not Found.

    What happened with that? Thanx.

  24. Xbitz says:

    Hi again,

    I’m using Westhost as the hosting provider to add the sub-domains.

    The only error I got is HTTP/1.0 404 Not Found.

    Thank you.

  25. Xbitz says:

    I’ve added http://img1.futuresgalleriablog.com for the sub-domain.

    • Hey Xbitz,

      I’ve checked your sub-domain and all seems to be fine. Could you please check if the files have been successfully uploaded to the sub-domain path?

      There must be some miss-synchronization with the plugin core files.

      Let me know how it goes.

    • Hello Xbitz,

      I’ve checked your sub-domain and in fact it’s returning a 404 Not Found. In order to further test this, as it might be specific to your file system, I would need to access your blog and/or FTP. If you would like me to test it please send me an email to me@joseairosa.com.

      In the meantime I will try to find the error from my side.

      Hope to hear from you soon.

  26. Erik says:

    Hey guys,

    Sounds like a sweet as plugin, but.. what about interaction with WP Super Cache? Are they compatible?


    • Hello Erik,

      They sure are. I’ve tested with a few other blogs that had wp super cache and it worked great. I am however work on better integrations with other known plugins.

  27. Viki says:

    Hi José,

    Just followed your instructions and created a new sub-domain. Now there is a new folder with the sub-domain in my File Manager. Would this suffice the purpose of the plugin? I hope I don’t need move any wordpress related content in this folder.

    Also, I upgraded the plugin, now it does not give an option to input sub-domain but asks me to input the root dir, I did that and it says the root dir was accepted. But getting an error on top that says –

    “While installing this script I was unable to edit load_image.php with your server definitions. Please change load_image.php permissions to 777 and click the button bellow.”

    I changed the load_image.php permissions to 777 and it made the required changes. Now I changed them back to 755, and it looks ok so far. Now I get the option to input the sub-domain.

    I am however not able to access the subdomain. It gives a 403 forbidden error. I tried changing permissions of the subdomain folder to 777, still it gives the 403 forbidden error. Getting error –

    “The subdomain you just added could not be verified. Click here to check it.” When I click on the subdomain link, boom – 403 error. What am I doing wrong. Compatibility and root folder status are both “Green”

    So far all your instructions have went well…..if we get through this 403 error, I think the plugin would start functioning on the blog. Please advice.

    Thanks for all your help,

    • Hello Viki,

      Thank your for the information.

      So, when you get a 403 error when accessing a sub-domain it’s normal if you don’t have a index.html or a index.php file in there, see for example my sub-domain: http://img1.joseairosa.com/. As you can see I’m also getting a 403.

      With the plugin I provided a test image. You can access the test image through the sub-domain using the following path: wp-content/plugins/parallel-loading-system/check_headers.jpg

      So if a blog is located on apache root folder you should be able to test it by going to http://my-sub-domain/wp-content/plugins/parallel-loading-system/check_headers.jpg.

      If for any instance your blog is not located on your root folder, lets say, it’s located on a folder called blog (http://my-somain/blog/) you should test it by also adding this folder on the sub-domain, http://my-sub-domain/blog/wp-content/plugins/parallel-loading-system/check_headers.jpg

      This is only for testing purposes and will let us debug what might be wrong.

      On other note, it might be a problem with your root path. If the above doesn’t help, please open the load_image.php file, inside your sub-domain FTP folder, and check the root folder, it’s something like: “define(‘ROOT_PATH’,”);”. Send me an email with that path and I’ll tell you what might be wrong.

      Hope I’ve been clear :) Let me know if you require additional support.

  28. Massa P says:

    It overwrote my .htaccess files (and wiped out any customizations I made to it). Bummer. Everything seemed OK (home page, WordPress admin pages) but then I clicked on a post permalink (any post. actually)… and got 404 all the time. Basically, I guess it’s because my .htaccess file got overwritten entirely… instead of just having some entries added to it…

    Thank goodness for having made a backup of my .htaccess file earlier…

  29. Massa P says:

    Oh… I see… the new version 0.1.1 fixd the issue (.htaccess file is no longer overwitten)? Just tried the new version… seems OK so far.

    • Massa,

      Great! :) Please let me know if you require additional assistance.

      === UPDATE ===

      I will be addressing the .htaccess rewrite issue today. I apologize for the problem caused!

      Thank you for the report.

  30. Hello Jose,

    I tried your plugin yesterday. It didn’t recognize the sub domains. I saw the update today. Followed all the instructions and then got a error which knocked my blog down.

    I had to remove the plugin, and rewrite my htaccess again. Not so happy.


    • Hello Dave,

      I truly apologize about that issue. I’m looking into it as we speak.

      However, this plugin does not mess with WordPress .htaccess in any way unless the sub-domain is exactly the same as your WordPress path, which shouldn’t be.

      I will release today a hot-fix to address this problem in order to better protect WordPress own .htaccess.

      I thank you for trying the plugin and reporting this issue!

  31. Patrick says:

    Hi José,
    I just downloaded the newest version, installed it and clicked the update button.
    Firstly everyhting seems to be perfect (I noticed the faster loading).
    Next I changed a few things (updated the subdomain path, ..) and afterwards only the main page works, such as Massa P described.

    This problem shouldn’t be a bug in your plugin – i think it is a serie of unfortunate events.
    I tested the plugin in a development branch, so this is no realy problem.

    Now I just want to say thank you for this realy helpful plugin! Good job! :-)

    Regards, Patrick

  32. Katrina says:

    I am working on a new website using a Microsoft Expression Web 2 template. I am not an HTML coder and don’t really understand CSS, but can create okay in these templates. I would like to add the star rating system you have above to some of my pages, but not sure how. I can easily add the HTML coding to the page, not sure how to create the CSS or where to find the images to upload? Any help you have would be greatly appreciated. If not, I understand.

    • Hello Katrina,

      You should send the images to your FTP or any image hosting service out there.

      To add the CSS you need to create a new file (called rating.css for example) and add the code I provide on the post.
      After that you need to go to your HTML code and before the tag add the following:

      <link rel="stylesheet" href="http://www.example.com/rating.css" type="text/css" media="screen" />

      This is an example. Remember to change http://www.example.com with your own domain.

      You should also edit the CSS code i provided. Where you see

      background: transparent url(img/stars.png) top left no-repeat;
      background: transparent url(img/stars_full.png) top left no-repeat;

      you should change img/stars.png and img/stars_full.png with the full code, for example, http://www.example.com/stars.png and http://www.example.com/stars_full.png

      Please let me know if you require any further assistance.

  33. Katrina says:

    Never mind… I figured it out. Thanks anyway for the great tip!

  34. mastershake says:

    Any idea when you will have a NGINX configuration example? (nginx rewrite rules, etc). Stumped on getting a compatible nginx rewrite rule in place.

    • Hello mastershake,

      You might try something like this since QSA is automatic in NGINX:

      if (-f $request_filename) {
      if (-d $request_filename) {
      rewrite ^(.*.(jpg|jpeg|gif|png|php)) load_image.php?file_src=$1&extension=$2 last;

      Let me know how it works.

  35. Ron says:

    Hi José, what’s up with Windows Web Server 2008 with Plesk 9 (64 Bit)? Running IIS7 i have web.config instead of .htaccess and your interesting plugin troubles:

    I was unable to find your correct root path. Please use the input field below to add it manually.

    The path you provided doesn’t seem to be correct. Please double check it.
    Specify Apache Root Path:

    If you don’t know how to retrieve your root path I will walk you through.
    At the moment, I’m is being run from this folder:


    It doesn’t let me tell the path, with windows it is D:inetpubvhostsexampledomain.comhttpdocs – so said, WP is directly installed in that root.

    what gives? Kind regards, Ron

  36. Ron says:

    Hmm, have just changed the path – just out of curiosity, really – changed to:


    and the plugin accepted it o_O – so instead of “” seems “/” to work with Windows (as usual in native Win-environment)

    • Hello Ron,

      Thank you for posting your feedback. Unfortunately I didn’t have a Windows system to fully test the system out.

      The issue you exposed is a bug and I will fix it on next update (tomorrow). When the system builds the path it will automatically try to find the best appropriate and possible root path to help you on your manual insertion. The path is being re-built with “” as default folder separator.

      I would love to get your on-going feedback on how the plugin performs on a Windows based server.

      Best regards.

  37. Ron says:

    Hi José, yeppers of course :) . Your idea of such an Parallel Loading System is genius and i loved it the second i’ve read of. Hope i’ll get it working with Win, still messing around now with subdomains; but i#ll keep you updated :)

  38. Ron says:

    Dunno why it is not able to add the subdomains correctly – maybe because of the ” /” thingy.

    Parallel Loading System – 0.1.2

    You can use this plugin to enhance the loading time of your website by parallelizing the connections to the server, since standard HTTP v1.1 only allows 2 connections, at the same time, from the same domain.

    This plugin will virtualize connections, through defined subdomains. You can have as many subdomains as you like, but I do recomend using a maximum of 5.

    Congratulations! I was able to update/install “http://img1.exampledomain.com” files

    You should now revert the permissions of both D:/inetpub/vhosts/.exampledomain.com/httpdocs/img1 folder and file load_image.php inside it to 755

    Sub-Domain has been added
    Active Sub-Domains:
    We could not find any active subdomains. Please add them using the form bellow.
    Inactive Sub-Domains:

    Sub-Domain Health: HTTP/1.1 404 Not Found

    Sub-Domain Health: HTTP/1.1 404 Not Found

    Maybe you could install on a local windows box @home XAMPP http://www.apachefriends.org/de/xampp.html or sth. like that, just to see how it works with Win…

    Just getting now a cup of sleep ;-)

    • Hey Ron,

      Thanks for the feedback. This might be a problem with the .htaccess since you’re on a Win Server. You told me you are using a web.config instead of a .htaccess right?

      Try to go to your sub-domain pages and add the web.config file yourself. Then on that file add the following:

      <rule name=”Main Rule” stopProcessing=”true”>
      <match url=”^(.*.(jpg|jpeg|gif|png|php))” />
      <conditions logicalGrouping=”MatchAll”>
      <add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
      <add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
      <action type=”Rewrite” url=”load_image.php?file_src={R:1}&extension={R:2}” appendQueryString=”true” />

      Not sure if this will work! I will try to implement this support on next release.


  39. quaker says:

    I got this error after i changed the load_image.php to 777

    Warning: get_headers() [function.get-headers]: This function may only be used against URLs. in /home/studio25/public_html/wp-content/plugins/parallel-loading-system/wp-pls.php on line 75

    Warning: current() [function.current]: Passed variable is not an array or object in /home/studio25/public_html/wp-content/plugins/parallel-loading-system/wp-pls.php on line 75
    Sub-Domain Health:

    • Hello quaker,

      Another user had the same problem. Be sure to add http:// and https:// to the sub-domain. Otherwise it will not accept.

      I will be releasing a fix for this on the next version (today).

      Thank you for your feedback!

  40. quaker says:

    here is line 74 75 and 76

    function subdomain_health($subdomain) {
    return current(get_headers(check_for_trailing_slash($subdomain).

  41. Ron says:

    ^^ got all working by theory in ii7. But practically whilst being parsed the images are missing. It seems to fail mainly because the rewrite is not working as intended. .htaccess works not for II7 and i had no luck ‘translating’ the .htaccess towards web.config :( i am terrible sad

  42. Ugur Eskici says:

    Hi Jose,
    Its usefully plug-in and its good idea. Good job man but should we define a cname for subdomain?

    • Hello Ugur,

      Thank you for the feedback! It’s great to know that people are enjoying the concept.

      It’s not needed if you use a Server Control Panel (cPanel, Plesk, DirectAdmin…) as they do everything for you.

      If you’re using managing your server by yourself you will need to add an entry on http.conf to reflect your sub-domain info. Let me know if you require additional information.

  43. Alonso says:

    Hi Jose, really like your idea of your plugin, I’m half the way to get it working, it’s look like I’m having the same issues Viki has, I do get the test image if I put it by the 2nd example you showed her, but not through the control panel of the plugin, I did added an index.html file just to check if the subdomain exists and it works fine. I don’t understand your 2nd suggestion to her to open the load_image.php file can you please clarify, If you mean that the path should be changed to /home/content/t/h/i/thisisnotreal/html/my-domain-name/blog/’); instead of /home/content/t/h/i/thisisnotreal/html/my-domain-name/’); its not working… :-( I still get the “The subdomain you just added could not be verified. Click here to check it.” message. Any help with this will be appreciated..

    Many Thanks..

    • Hello Alonso,

      Thank you for your feedback.

      The example I gave was in a situation where your blog is not installed on your root apache folder. Lets say, my blog was not installed on apache root folder and was installed on a folder called myblog. The URL to my blog would be “http://joseairosa.com/myblog/”.
      So if you have your wordpress installed on other folder try to specify on load_image.php.

      Please let me know if you need further clarification.

  44. TP says:

    Hi Jose,

    First thanks for the plugin. I’ve been looking for this kind of ‘solution’ and out of the blue, your plugin came!

    However, I couldn’t get your plugin to work. It always unable to verify the sub-domain although I can check the presence of your image checker manually (like you wrote in several comments above).

    Any idea why?

    • Hello TP,

      Thank you for the feedback.

      Can you tell me what sub-domain you’re trying to add?
      Also, this is normally a result of having a system variable disabled (allow_url_fopen).

      Can you access that script you created and add this echo ini_get('allow_url_fopen');

      Let me know what is returned. I will had a check for this on next version :)

  45. TP says:

    Hi Jose,

    I think I got what my problem is. Apparently my hosting provider installed some security thingy which turn off or disabled the get_headers() function.

    I made a simple PHP script to check this, and the result is like this:

    Warning: get_headers() [function.get-headers]: URL file-access is disabled in the server configuration

    Warning: get_headers() [function.get-headers]: This function may only be used against URLs

    Now I need to find a way to enable the get_headers() function

  46. Jochen says:

    Hi José,

    I read about your plugin today and totally jumped on the idea. However, I had quite some problems getting it to work and would like to suggest the following:

    After my experiences with the plugin, I think you might be right to assume everything works out fine (most of the time), if users have shared hosting accounts which they have access to using the mentioned hosting panels like cpan,… I have a root server with shell access and not a hosting-panel at all and this way, things get different…

    I guess you assume people create a “subdomain” (it’s not, actually!) using a panel which installs a new folder on the same machine as the blog, set’s up DNS service for it, activates apache for it and so on.
    After reading the docs, what I did was: set up DNS cnames for the new hosts (which in fact your “subdomains” are) and add those names to the virtual host config of my apache for the blog. I think this makes perfect sense, saves clutter on the server and would suggest you add support for this to your plugin.

    What happened was: upon activation of the first subdomain, my blog was busted, because the plugin replaced the .htaccess with it’s own.
    But even with changing that back and implementing your additions to my .htaccess, I was not able to get a subdomain to work this way.

    After reading this page and some of the posts, I came to the conclusion that I need at least one additional vhost for this and that got me started.

    But still, some more things to mention ;-)

    It’s anoying that Parallel Loading System (PLS) makes backups of it’s own files all the time, although there are no changes… and I think it knows about that, because it is able to tell that files are out of sync.

    Please make it clearer, what you want to be entered in the “Subdomain”-Field. A host or subdomain has no “http://”, that’s an URL, but the examples have it…

    Your plugin requires two apache plugins activated on the server. Unfortunately, it does not protect the user for problems with those missing. Although mod_rewrite is very common, especially with WordPress, I think, mod_headers is not…
    If you embed your configs in

    there would be no errors on servers not running the plugin ModRewrite. (Sorry, don’t know how this should read for mod_headers). As The Header-Mod is optional, this would be a great plus!

    Deleting subdomains that do not work is a pain, as the “remove” button seldom visible.

    May I suggest to add to the documentation, that the subdomain is basically working, if you are able to retrieve

    The plugin asumes that blog and “image-server” reside on the same machine. But with big hosting environments, you can not be sure on this…

    Okay, enough of the rant. Thank you the plugin with this new, fresh and interesting twist to performance optimisation.

    Regards from munich


    • Hello Jochen,

      Thank you very much for your insight! It’s great to have this kind of feedback.

      I will had the option of creating a backup file optional, lets say, you are notified that a script file is out of sync and if a need for backup is detected I will add a middle step that will let you choose if you want to back it up or not.
      I was also in the process of developing a backup manager system that will let you, directly from the plugin control panel, manage all you backups and delete/restore them at any time.

      What do you think?


      It’s anoying that Parallel Loading System (PLS) makes backups of it’s own files all the time, although there are no changes… and I think it knows about that, because it is able to tell that files are out of sync.

      I’ve been testing this on my local installation and it’s only creating backups when it finds a miss-synchronization. Can you explore this situation a bit more?


      Yes I know that you can manually create a sub-domain directly on your apache configurations and you’re 100% correct.
      About the virtual host http.conf file, it’s a great idea. I just need to further investigate since the system that is actually installed will not let me change virtual host config file directly from PHP.


      What happened was: upon activation of the first subdomain, my blog was busted, because the plugin replaced the .htaccess with it’s own.

      This is probably because your sub-domain DocumentRoot is pointing to the same DocumentRoot of your domain. Please let me know if my conclusion is correct.

      If this is the case a backup should have been created of .htaccess (wordpress htaccess).

      I will be adding the functionality to append to .htaccess instead of replacing it if it detects that the .htaccess is WordPress own .htaccess (this should resolve the problem when you are using the same domain and sub-domain DocumentRoot)


      I will also had compatibility checks to mod_rewrite and mod_headers, already got it for next version :)


      Can you explain a bit more this situation?

      Deleting subdomains that do not work is a pain, as the “remove” button seldom visible.


      I will be adding that information to the documentation, thank you!

      Best regards Jochen,
      Looking forward to your reply!

  47. Viki says:

    Hi Jose,

    I’ve sent you an email describing the issue that I’m facing, in detail, at hte email address which you mentioned above :- me [at] joseairosa [dot] com.

    I hope that’s the correct address and you got my email. If you’ve got my email, then I’m waiting for a reply anxiously! Just wanted to confirm once.

    Thank you,

  48. Patrick says:

    Hi José,

    >>Can you also check, when you open, let’s say, http://my-sub-domain/wp-content/plugins/parallel-loading-system/check_headers.jpg and see if you get a 200 OK or a 404 NOT FOUND.<<

    I get a 200OK.
    If you release the new version next week or so, I am definitively will install it.


  49. Rene says:

    Hi I installed the plugin, it was a bit difficult to get the sub-domains to work correctly i.e. the plugin to recognise that I put the sub-domain, but after persisting i did eventually get it to work.. My concern or problem that i discovered was that I also use a plugin called “simple View” which has a neat way of zooming up an image, BUT when using Parallel plugin, it made the simple view plugin change the bounding box apperance and also it’s size and also the size of the image was only half of the box and the zoom function was also affected.

    I’m not looking for a solution, more to let you and others know about this. If you do have a solution that would be great, because for straight forward loading of a website the plugin works fine..


    • Hello Rene,

      Thank you very much for your feedback.

      In what way do you feel the sub-domain process would be simpler or faster?

      About that plugin I will download it and apply a fix so that they become compatible.

      Let me know if you have any questions or require additional support!

  50. Alonso says:

    Jose, thank you for your support, but still doesnt work, I’ve tried many ways and still its not working. I have noticed that once I hit the button it does creates an .htaccess file in the subfolders that im trying to add and another load_image.php file, i have tried to edit the path there as well and still didnt work, do I have to edit this load_image.php in the subfolder as well or only in the plugin folder or both? my w instalation is basically just after my domain name, http://www.mydomain.com/blog/

    any suggestions? will appreciate as really trying to get it work, Im also using go daddy as Viki if it helps if i got it set it up wrong from the first place..


    • Hello Alonso,

      Lets try to get it to work :)

      If you’re editing the files manually you’ll need to do it on both plugin folder and sub-domain folders. This however is the plugin main job.
      If you can wait until tomorrow I’ll be releasing version 0.1.3 in which I improved all the plugin greatly.

      Viki contacted me by email and I gave her some directions. Still waiting on her reply.

      Thanks for your patience.

  51. Alonso says:

    Cool.. Many Thanks Jose you’re a star… I’ll try to follow otherwise will wait..

  52. Jochen says:

    Hi José,

    thanks for the reply!

    > Hello Jochen,
    > Thank you very much for your insight! It’s great to have this kind of
    > feedback.

    The least thing to give back for what you did for the community!

    > I will had the option of creating a backup file optional, lets say, you are
    > notified that a script file is out of sync and if a need for backup is
    > detected I will
    > add a middle step that will let you choose if you want to back it up or
    > not.

    That’s better, but still no real help if you have need for the .htaccess anyway, because PLS will not know that the settings are in place in a combined .htaccess and would always try to install it’s version.

    > I was also in the process of developing a backup manager system that will
    > let
    > you, directly from the plugin control panel, manage all you backups and
    > delete/restore them at any time.
    > What do you think?

    Much better, but see above, The backup manager is a good idea, but generally I would recommend having the needed code for a .htacess file which could be inserted into an existing one, creating one if none is there.
    PLS should be able to recognise, if it’s settings are present in an existing .htaccess (use sort of start/end comments to recognise if they are there).
    You could offer to replace those settings in any .htaccess-file with the original ones.

    BTW: .htaccess is another requirement of PLS at the moment, which is not always available.

    > ————
    > It’s anoying that Parallel Loading System (PLS) makes backups of it’s
    > own
    > files all the time, although there are no changes… and I think it knows
    > about that,
    > because it is able to tell that files are out of sync.
    > I’ve been testing this on my local installation and it’s only creating
    > backups
    > when it finds a miss-synchronization. Can you explore this situation a bit
    > more?

    I set up one vhost with one correpsonding folders for five PLS-Subdomains. For each “add-process” of a new subdomain, there was a backup of the .htaccess and the load_image.php. PLS was not able to find my document-root, perhaps that’s it?
    I had some problems getting started with several subdomains having to be entered over and over again which all gave another backup.
    Setting up a new domain gave me sync errors with the older ones pointing to the same folder, resulting in more backups.

    > ————
    > Yes I know that you can manually create a sub-domain directly on your
    > apache
    > configurations and you’re 100% correct.
    > About the virtual host http.conf file, it’s a great idea. I just need to
    > further
    > investigate since the system that is actually installed will not let me
    > change virtual host
    > config file directly from PHP.

    I don’t think any hosting environment will or should allow this! Just support this in the Plugin-backend and make the basic requirements clearer in the docs.
    I would strongly vote for a version that hosts the pls in the same apache vhost instance as the blog!
    > ————
    > What happened was: upon activation of the first subdomain, my blog was
    > busted, because the plugin replaced the .htaccess with it’s own.
    > This is probably because your sub-domain DocumentRoot is pointing to the
    > same
    > DocumentRoot of your domain. Please let me know if my conclusion is
    > correct.

    Yes. That was a logical conclusion after reading the plugin description. As the docs pointed out, the plugin was supposed to not change the blog in any way… :-D
    But as I can easily point any subdomain to the same folder as the blog, where all the images reside anyway… why should I want anything else? For this setup, load_image.php would not be needed (still nice for of the Header-Mods, though), changing the image url were just enough!

    > If this is the case a backup should have been created of .htaccess
    > (wordpress
    > htaccess).

    That’s correct and I had no problem getting it back up. But you know, there was this sentence in the pi’s doc… will not change the blog in any way ;-)
    > I will be adding the functionality to append to .htaccess instead of
    > replacing
    > it if it detects that the .htaccess is WordPress own .htaccess (this should
    > resolve
    > the problem when you are using the same domain and sub-domain DocumentRoot)

    Great to hear. I think you are right… if getting the .htaccess to work, you can have the same doc-root for your blog and any subdomain.

    > ————-
    > I will also had compatibility checks to mod_rewrite and mod_headers,
    > already got
    > it for next version :)

    cool. Please add it to the docs requirements. mod_rewrite is a must have, I think, mod_headers a nice to have.

    > ————-
    > Can you explain a bit more this situation?
    > Deleting subdomains that do not work is a pain, as the “remove” button
    > seldom visible.

    I had several subdomains configured which had errors. In such a situation, or when you are editing/adding a subdomain, you will not get the remove-button. With many active errors it was troublesome to remove those.
    i think I had to click “resolve” on each, add the doc-root and URL/Subdomain again and was only then able to click “remove”, starting over with the next.
    All I would like to suggest is to have the “remove”-button available all the time, at least for inactive subdomains.

    > ————-
    > I will be adding that information to the documentation, thank you!

    Please reconsider the use of the term subdomain. I think you are talking of hostnames or URLs.

    > Best regards Jochen,
    > Looking forward to your reply!

    No problem, was a pleasure.

    regards from munich

    • Hello Jochen,

      Thanks again for the feedback, much appreciated.

      I just released a new version of the plugin which should address most of the issues that you notified. Could you please take it for a “ride” and let me know what you think?

      You and everyone else can find the changes on the plugin page on WordPress plugin repository.


      PS: I had a problem with PHP apache modules function. Some systems might not have it installed so I need to work on a workaround.

      Looking forward to your reply.

  53. Manoj M says:

    Hi, I am using ur plugin and is indeed made my site fast! The only issue I have is that it’s not displaying the post thumbnails on the single posts.

    • Hello Manoj,

      Thank you for the feedback.

      Could you paste here the link of the images that you’re talking about? It might be needed to make a specific adjustment to the code.

      Looking forward to hearing from you.

  54. Erik says:

    Hello there!

    Tried and installed this plugin, really nice idea. Problem is, it creates 404 errors. Not always but sometimes.. the image src is:


    That is.. Sometimes this plugin makes links that include both the subdomain and the real site.. when the URL should be something like: http://img.fragadietisten.sesnurkify/wp-content/uploads/2009/04/svimma-300×225.jpg

    Maybe this is easy to fix? Or maybe it is an intervention with other plugins?


  55. Erik says:

    damnit.. seems like your site automaticly enters “http://img4.joseairosa.com/” in my comments without me writing it??

    • Hello Erik,

      Thank you for the feedback.

      About the posts it’s the plugin itself that changes the links. I’m looking into it to avoid it to change on comments, this is a known bug that will be fixed! Sorry.

      As for the links that you showed me, the plugin will make the choice of loading the images internally or externally depending on if they are hosted on your domain or if they are hosted externally.

      On the options, if you choose Simple Method all images will be loaded externally, if not they will be loaded using the concept above.

      http://img.fragadietisten.se/snurkify/wp-content/uploads/2009/04/svimma-300×225.jpg, this link is working properly.

      Are you running the latest version?

  56. Erik says:

    Im was on 0.1.4 and just upgraded til 0.1.5, when doing this I got this message “I’ve detected that the original script file didn’t have your correct root path. This has been fixed :)

    Maybe this will fix the error? :)

    • Hello Erik,

      This functionality has been implemented since version 0.1. The changes I made to the plugin on this new version might have resolved the problem you’ve been experiencing.

      Can you please test it a bit further and if you find any issues please report them I’ll fixed them asap.

      Thank you for the feedback :)

  57. [...] phải hosting nào cũng có thể cài đặt thành công. Tuy nhiên bạn có thể vào đây để được hướng dẫn chi tiết [...]

  58. 256studio says:

    once i view the img1.website i see *.bak and php file. can i put in a index.html or this would be great add on. how about a index.html to redirect back to the main site. since people can view the folder content.

  59. John says:

    Greetings, and thinks for the time you’ve put into this. I’m getting a 404 from my subdomains, img1, img2, img3. Was hoping you could have a look, and thanks again!


  60. John says:

    José, not Plesk (cPanel Accelerated2), and the sub-domain folders are located in the html_public directory.

    I’ll try the simple method for now, but if you have any other ideas I’d love to hear them. :)

    Kind regards.

    • Hello John,

      I will add html_public on search folders for the plugin. Thanks John.

      Are you still having problems in running the plugin? If you are under basepath restrictions you won’t be able to run plugin out of Simple Method. I’m sorry but that’s a security restriction imposed by PHP itself.

  61. Jeff says:

    Hi Jose, Using WP 2.9.2 with wp-supercache enabled it’s adding random characters to the end of the image url e.g.

    Any ideas?

    I’m using Version Thanks for the work on the plugin!

    • Hello Jeff,

      Thank you for the feedback.

      The characters are created and added by the plugin itself. It’s a way to make sure the cache is coherent and improves caching on the browser point of view.
      It’s a query string that will not (should not at least ^_^) mess up image rendering.

      Just on a side note, those characters are the md5 encryption algorithm of the image name.

  62. Erika says:

    Jose – will you be releasing any updates to match the new release of wp-e-commerce (

  63. Hello Erika,

    At the moment it will be a bit hard for me to focus on releasing a new compatible version.
    I have already noted down this on my to-do list and I’ll try to have it ready for next week :)

    Sorry for not being sooner.

  64. Erika says:

    Will the same work around you have created (above) work?

  65. I will have to take a look at the new code, but if they didn’t change anything on those 2 files it will work as before.

    You can test it out but create a backup of your wp-e-commerce files first and database.

    Also, don’t forget to backup both files (variations.class.php and purchaselogs.class.php) before installing the new version. After installing the new version got to your FTP and replace them. Again, don’t forget to backup your files ;)

  66. Jeff says:

    Follow up on the characters getting added to the end of the images. The images do not load when the random characters are added in. Do you think this is an apache or permission problem?

    • Hello Jeff,

      It’s really strange that the cache code is breaking the image code as it’s only a query string. It should not mess with the request itself.

      Could you please add the image link here so that I can debug the issue, thank you.

  67. John says:

    Hello, Jose. John again. I’m using your plugin on a client site, and they are on MediaTemple (dv), with the Plesk control panel. I’ve managed to get the plugin working in theory, in so much as I’m getting the 200OK message back from the subdomains (in simple mode). However, when checking the site the images are coming up missing:

    Would appreciate your thoughts on the issue, and thanks again!

    • Hello John!

      From what I checked the problem seems to be related with the fact that there is no www. on the URL… hum… didn’t see that one coming eheh. I will release a fix for this on the next version.

      As you can see, if you change http://whitemike.org with http://www.whitemike.org the image works fine.
      For the time being you can add the www. manually until the fix is out.

      Thank you for the report John and I apologize for the problem.

  68. John says:

    Wow, a real surprise! haha…

    I’ve had to disable the plugin. Using an .htaccess mod to the URI was messing with things, so I hope to be able to implement your plugin once there’s an update. Thanks for the work, it’s a great utility!

  69. lintang says:

    is it working with dramhost shared hosting? because when i install it, it can’t find the subdomain, i simply added it manually after creating it, and it can’t find it. i suspect dreamhost security cause it since I already dealt with some host and cpanel is much simpler, dreamhost got tons of apache modification that WP PLS can’t read, however if you manage to get it working on DH or got experience with PLS on DH, please mail me. thanks.

  70. Yashodhan says:

    Very beautiful plugin.. i’m really very thankful for your work for all of us.
    I’m working on website and recently i noticed your plugin is interfering with drop-down menu (or plugin called Menu Manager) when your plugin is active only main menu is shown, no sub-pages links which actually loads when your plugin is inActive.
    Kindly please look into this issue. also i have tested this with Concept-X Theme’s inbuilt menu, same thing is happing with menu with no child-menus..

  71. Yashodhan says:

    Thank you for reply.. :)

    Here are details what am using on my blog -

    1] Menu Manager – Version 1.0.4 | By Sulaeman

    2] (Theme) Concept X – Version 1.1 | By Phi

    3] Other Active Plugins on my blog -
    Akismet – Version 2.2.9 | By Matt Mullenweg
    Connections – Version | By Steven A. Zahm
    DTM jQuery Calendar – Version 1.2.1 | By Kevin Lanteri & Nicolas Bui
    Google XML Sitemaps – Version 3.2.4 | By Arne Brachhold
    Graceful Email Obfuscation – Version 0.2 | By Nicholas Wilson
    GZIP Enable – Version 0.2 | By Teguh Aditya
    News-Ticker – Version 2.0.0 | By Daniel Sachs
    Special Text Boxes – Version 3.5.44 | By minimus
    Wordpress Download Monitor – Version | By Mike Jolley
    all this running on top of WordPress – Version 2.9.2

    I hope this will help you to figure out what went wrong.. even i can keep my site on with your plugin enabled or i can also share my login details with you.
    Please let me know if you need anything else..

    May Nature bless you..

    • Yashodhan,

      Thanks a lot for the information provided! I’m 99% sure I can fix the issue with the information you just provided. If I happen to need actual access to your server I will contact you via mail for privacy reasons.

      Once again, thank you for the support given. :)

  72. Joe says:


    just installed your plugin, I have a slight problem : I am using PLESK my server setup is this
    that means my subdomain directory is outside the httpdocs
    what can I do in this case ? Any chance to get your extension running ? The plugin just does not find my subdomains …



  73. Hello Joe,

    In your case you need to activate simple method.

    Plesk configuration is protected behind the open_basedir restriction.

    Let me know if you require additional assistance.

  74. Yashodhan,

    I was not able to reproduce the problem on my side. Even with the Menu Manager Plugin. It might be a problem with the layout, however, I’m not able to test it because the theme is premium.

    If you could please email me some more details so that I can fix this?

    Thank you!

  75. Joe says:

    Hi Jose,

    thanks for your help, I just activated the simple method, but I still get the same error message … any ideas ?

    rewgards joe

    • Hello Joe,

      Strange that it is not working. I just tested on my other server that has a Plesk CP and everything installed with no problem.

      Is it possible for you to give me the link to your Blog? Contact-me via email with this information if you can. me[at]joseairosa[dot]com

      – EDIT –

      On a side note. When you activate Simple Method you need to manually drag&drop both .htaccess and load_images.php form your parallel-loading-system folder to every subdomain root folder.
      Unfortunately this the only way :(

  76. Joe says:


    just sent you a mail with the details



  77. DogDay says:

    Hi Jose!

    I have the same mentioned problem with dreamhost. I tried to manually specify my root blog folder by editing load_image.php, but it always gets overwrited with path ‘/’ when trying to add a subdomain.

    Any ideas about this issue?.

    Thanks in advance.

    • Hello DogDay,

      Still working on getting Dreamhost to work. Last few days have been a bit hard with a near release of my new plugin and this one.

      Should have updates on the next few days!

      Please hold on =)

  78. Anthony says:


    Great plugin! Can I suggest that you update instances of ‘&t’ to ‘&t’ to ensure xHTML compliance?

    Secondly, I want to exclude any images loaded via a PHP extension. I use a thumbnail plugin that stops working when I use PLS. I end up with links like this:


    These do not load so I want to prevent PLS from attaching itself to any image sources which point to a PHP file.


    • Hello Athony,

      Thank you for your feedback.

      I will take a look at the ampersand, good suggestion.

      A few versions ago I added support to timthumb directly without the need to “exclude” images. I will install this plugin on my development blog and check why it’s not working properly.

  79. Anthony says:

    Eh, in my last comment the html entity ampersand was rendered as ‘&’. Hopefully you understand what I mean.

  80. [...] This post was mentioned on Twitter by José P. Airosa, Eurico Leite. Eurico Leite said: RT @joseairosa: WP-RESTful WordPress Plugin | PHP, CSS, HTML, Web & beyond http://bit.ly/ctw1ib [...]

  81. Gadget Newz says:

    [...] WP-RESTful WordPress Plugin | PHP, CSS, HTML, Web & beyond [...]

  82. DogDay says:

    No problem, Jose. Thanks.

  83. DogDay says:

    Hey ! Jose:

    With the last update of the plugin everything seems to work with DreamHost now.

    Time to test and see how it improves the whole thing.

    Thank you very much and keep this good work. ;)

  84. Tony says:

    Can this plugin be used to interact with other REST APIs from other services such as Google, Freshbooks, Basecamp, etc, etc?

    • Hello Tony,

      Unfortunately no. This plugin is intended to install and have a fully working REST API on your Blog that will let other entities connect to your blog and, in the other hand, will let you connect to other WP-RESTful APIs from other Blogs.

      Anyways, I’ve been working on the last few days on what you just asked. I will be releasing a new version of the plugin that will enable this functionality.

      Thanks for your feedback!

  85. Tony says:

    Great! Specifically – I use WordPress as a centralized project management portal while developing client websites. I’ve been looking for a solution that will pull in various services I use to mange these projects and present them simply in my client portal site – a Google Doc here, a Freshbooks project task list there, etc. Rather than write custom code for each I’m looking to use a framework such as this to add different service APIs to my portal sites. I’m looking forward to watching this WP-RESTful project develop, very solid work here.

  86. Blake James says:

    I have a partial fix, but need help on the rest.

    I’m running Version and some code has been updated from what is listed in this post. I was able to make the appropriate changes. Mainly reformatting some lines into tables( adding etc.) and changing a few ” to ‘

    The only significant difference was instead of adding this line:

    $output .= ”


    Use this line:

    $output .= ” “.__(‘sku’, ‘wpsc’).”nr”;

    So, I’m pretty sure I have the variations.class.php file updated correctly (I’m not receiving any errors) and it looks good when adding a variation to the product.

    However, I can not figure out how to update the suggested code for purchaselogs.class.php . I have tried everything I can think of, and am out of options for that one. I would greatly appreciate help with the updates to the added lines of code for purchaselogs.class.php.



  87. bingjie says:

    great plugins. but when I add subdomain.my site dosnt load images anymore. the image is located sub.mysite.net/thumbs,,,, is this path a problem?

  88. Blake James says:

    Ok.. I some how skipped over José’s comment with this attachment: http://hotfile.com/dl/39664833/262b118/

    That fixed my issues with purchaselogs.class.php

    Everything is working now… Thanks José !!!

  89. ClementN says:

    Hello Jose,

    GREAT work! Congratulations!

    Do you have any plan to document the way an external non-wp platform can connect and use the WP-RESTful API of a WP installation.
    I realize that a wrapper for it can be a time consuming thing.

    Thank you very much,

    • Hello Clement,

      Thank you for your words :)

      I have provided all the files needed for this on the “API Client PHP” folder. It works exactly as Twitter API works.

      I will try to make a screencast on that in the future days.

      Best regards!

  90. ClementN says:

    And .. I can’t wait to see the next version including the interfacer with other APIs ..

    Keep us updated each time you have the chance :)

  91. ClementN says:

    Wow.. So much work ..
    Right. “API Client PHP” is exactly what i need :)

  92. I’m working on that as we speak :)

    My idea is to provide 2 things:

    1- An easy way to develop in-house plugins with oother APIs
    2- Provide a working and simple framework for easy connection with external non wp-restful APIs.

    I will try to have it ready til the end of the month.

  93. ClementN says:

    You’ve got a new friend :)

    Thank you,

  94. [...] consultar mais informação na página do Plugin ou directamente no repositório de Plugins do WordPress Share this on [...]

  95. Nuno says:

    Congratulations for the work with this plugin, really amazing stuff here. Thanks!

  96. [...] original post here: WordPress Plugin – Parallel Loading System | PHP, CSS, HTML, Web & beyond Tags: optimization, performance, [...]

  97. MuraT says:

    i like the way u move. thanx

  98. Morgan says:

    Hi – awesome fix. I’m on and it works great. I’m trying to extend it to allow for the SKU to come through in the admin email once the cart has submitted. I know it’s line ~180 in the transaction_result_functions.php but can’t nail the SQL. Any help would be greatly appreciated. Thanks again!

  99. Dan says:

    Hey guys, I’m having a bit of trouble with this, I can’t seem to find this code anywhere in the variations.class.php


    $output .= ”



    any ideas?

  100. Dan says:

    (I’m running version by the way)

  101. Dan says:

    Actually disregard all that, all seems to be working now!

  102. Zach Browne says:

    After reading all of the documentation, which it quite impressive, I’m still trying to figure out a good use for this. Can you list a few situations in which I would want to use this framework? The developer above with the multiple clients gives me sort of an idea. Specifically why did you develop this plugin?

    • Hello Zach,

      Thank you for the comment.

      I developed this plugin, first of all, out of fun and challenge. Secondly for a few end-game implementations:

      - iPhone/Andorid/Windows Mobile app development for your blog
      - Blog networking (connect more than one blog that you own to each other)
      - Unified login system
      - Development of a centralized blog info repository. (this is one thing that I’m thinking of for the future, basically think of this like feed aggregation, but with the possibility of sharing more than only posts… basically you can share almost everything you want from your blog)
      - Advertisement system maybe. There surely is an application for this but it needs to be very well thought.

  103. Gabe says:

    Would be possible to have css and javascript parallelize in addition to pictures?

  104. Hello! have you seen this before?

    Warning: Cannot modify header information – headers already sent by (output started at /home/dusting/public_html/wp-content/themes/OnDemand/header.php:12) in /home/dusting/public_html/wp-content/plugins/wp-restful/lib/REST.inc.php on line 669

    Warning: Cannot modify header information – headers already sent by (output started at /home/dusting/public_html/wp-content/themes/OnDemand/header.php:12) in /home/dusting/public_html/wp-content/plugins/wp-restful/lib/REST.inc.php on line 671
    Not Found

    The requested URL /api was not found.

    I’m trying to work it out as we speak. Any tips would be really appreciated!

    Thanks, Dustin!

    • Hello Dustin.

      Thank you for your feedback.

      That problem has also been reported by other user and I’m on the way to fix it. I apologize if it’s taking a bit of time but the work at my company has increased a lot in the past few weeks.
      Doing my best.

      Sorry for the inconvenience.

  105. No worries.. You can drop me a line on twitter when you’ve got it sorted.. @thorstone137


  106. props says:

    Hi. I am getting this : That sub-domain is returning an HTTP error. I cannot add it knowing it will not work.
    Sub-Domain Health: HTTP/1.0 200 OK
    GD Library It seams to be installed and working well.
    PHP Version Great! You’re using PHP version 5.2.14.
    Apache mod_rewrite Great! Your apache instalation has mod_rewrite module loaded.
    Apache mod_headers Great! Your apache instalation has mod_headers module loaded.
    Health checks Impressive! Your server has ability to check domains health. This however doesn’t mean that your system will be health aware.
    Apache You are running an Apache system.
    Apache Root Path Your apache root path seems to be healthy. “/home/xxxxx/public_html”

    No idea what to do?

  107. [...] from: WP-RESTful WordPress Plugin | PHP, CSS, HTML, Web & beyond Tags: [...]

  108. [...] the net, using them to create an inline-safe one.At first, I tried to go with José Airosa’s Easy CSS Star Rating Layout (1) and Markus Weichselbaum’s How to use CSS to display rating stars [...]

  109. [...] потока на реда. Първо опитах с решенията на José Airosa “Easy CSS Star Rating Layout” (1) и на Markus Weichselbaum “How to use CSS to display rating stars” [...]

  110. Hi,

    First, thanks a lot for your plugin ! It is very useful !

    I try to use it, with the awesome “WP-RESTful Users Plugin”, to use a worpress as OAuth provider for other sites. Unfortunately, I got the following error when i call user/verify_credentials.json :

    Uncaught exception ‘OAuthException’ with message ‘SQL Error in
    OAuthStoreMySQL: Unknown column ‘osr_start_time_call’ in ‘field list’
    SELECT osr_allowed_calls as allowed_calls,
    osr_calls as calls,
    osr_last_call as last_call,
    osr_start_time_call as start_time_call
    FROM wpr_oauth_server_registry
    WHERE osr_consumer_key = ‘bbb02fd1177486919d287d120193dcad04ce40a1f’
    ‘ in /var/www/wordpress/wp-content/plugins/wp-restful/lib/store/OAuthStoreMySQL.php:2167
    Stack trace:
    #0 /var/www/wordpress/wp-content/plugins/wp-restful/lib/store/OAuthStoreMySQL.php(2043): OAuthStoreMySQL->sql_errcheck(‘??????SELECT?os…’)
    #1 /var/www/wordpress/wp-content/plugins/wp-restful/lib/store/OAuthStoreMySQL.php(806): OAuthStoreMySQL->query_row_assoc(‘??????SELECT?os…’, ‘bbb02fd11774869…’)
    #2 /var/www/wordpress/wp-content/plugins/wp-restful/lib/store/OAuthStoreMySQL.php(820): OAuthStoreMySQL->getConsumerRequestCount(Array)


    • Hello Gregoire!

      I’m glad you liked it and you managed to comment ;)

      As for the error, for some reason, WP-RESTful is not being able to find the database field required for the action. Please make sure the database is properly installed.

  111. José,

    I think it is (properly installed). But if I look in the mysql.sql script (in wp-restful/lib/store/mysql) the table definition for wpr_oauth_server_registry does not have any osr_start_time_call column !?!


  112. Christian says:

    A lot of your code seems rather complicated. You should check out the ABSPATH-constant WordPress defines. It pretty much contains what your get_root() function tries to detect. And if the Script is running on Windows can easily be detected by using the PHP_OS constant instead of checking for A: – Z: drives. Last but not least: if you wanna know if the system is using / or \ you could use the DIRECTORY_SEPARATOR constant.

    • Hello Christian,

      Thank you for the suggestions. I know the code can/should be optimized and I will take yours into account on the next release of the plugin.

      Some of the code had to be adapted to various reports I had on the plugin not working on some platforms.

  113. Ciprian says:

    Thank you VERY MUCH Jose for this addon!!!

    Could you please also tell us how to print the SKU for each product variation (on the checkout page for example).

    Thank you!

  114. Ciprian says:

    ps: or to send the sku codes in the admin email report…

  115. It’s peculiar, that often the simplest methods are often the most appropriate! I’ll adopt the above mentioned tips into preparation and wait to see my results. Thank you for sharing this information!

  116. silly me says:

    where do you get the images from? am a newbie to this, I am trying to add rating stars

  117. Vera says:

    Hi Jose, excelet job!, but for security I´ve added an index.php into every folder that belogs to each subdomain with the purpose not to show the content of every folder. Inside the index.php this code:

    Why to do this?. Just because the folder img1,img2,etc.. requires to change their permisions to 755 and that is not secure ;) . Hope this can help to everybody.

    The plugin works perfectly and doesnt require enough to set it up. Everything depends of the Hosting Provider, if anybody can have those requeriments, everthing will go fine just following your steps.

    My site was taking 11 seconds to load, now its taking between 2 and 5.

    Thanks for sharing it.

    • Hello Vera,

      It might have to do your PHP GD library. It’s the first time this issue has been reported as far as I know.

      Do you have any other plugins installed on your wordpress installations that use PHP GD as well?

  118. Vera says:

    I was using Simple Captcha, that one I think use PHP GD Library but now im using anotherone called “not captcha” addapted to spanish and my blog.

    As I know, Akismet uses aswell PHP GD Library, and it is activated. Is there another way to know from plugins that someone has on WordPress which ones are using PHP GD? mmmm, it would be a great idea to develope one plugin that detects that, dont you think so?.

    Hope my Tip can be followed by many people and dont forget to include it in your next update. Dont forget to mention who told you that lol, it is a joke ;) .

    I´ll let you know if I realized another tip or issue.

    See you around

  119. Gabe says:

    Hi. Love the plugin. In the most recent version it seems there’s a bug, I assume it is from the change in how the way the plugin detects folder separators now. It worked fine, but now it us unable to find the images, the path to the images is incorrect now resulting in broken links. I know a few others are having the same issue. It seems like a minor issue. I’ve toyed with it a bit, but haven’t pinpointed it yet.

  120. Gabe says:

    I forgot to mention this in the last comment, but for those who are having issues with the latest plugin version providing the wrong path to your images, just remove revert back to the previous version of the plugin from this link: http://downloads.wordpress.org/plugin/parallel-loading-system.0.1.7.zip

    Be sure to replace all versions of old files as well (.htaccess and load_image.php) just in case.

  121. recepti says:

    Hi. I read a few of your other posts and wanted to know if you would be interested in exchanging blogroll links?

  122. I don’t even know how I ended up here, but I thought this post was good. Cheers!

  123. Teas says:

    Concise and well written, thank you for the info

  124. Brian says:

    Jose, I really look forward to using your plugin, my page load time is pretty slow. But I have a bit of a funky setup and I think that caused everything to … well … break. I get a 404 now when I try to go to my admin page.

    Could you please contact me via email? (I included in this post)

  125. Nicky Pingtown says:

    Damn, rather nice article. Where can I find this subscription?

    Nicky Pingtown
    London escort spanish

  126. jaqlin says:

    I am pretty new to HTML. So I just copied the contents of both the CSS and HTML into a single file, even downloaded the empty stars and the full stars,
    when I changed the % value from 27% to 50% i just see
    empty stars all the time, no matter to what % I change it to. is there something else that I shld to.

  127. You made some fine points there. I did a search on the matter and found the majority of folks will go along with with your blog.

  128. Tadeusz says:

    I really like your blog. Thrust into the top issues in this subject. It seems to me that you have many wise words to say and not afraid to speak aloud their sentences. Keep up the invite to your blog pozycjonowanie stron

  129. Andrey says:

    Great plugin ! Many thank to autor. But have some problem with e-commerce site. List view of e-commerce catalog loaded in parallel very good, but table view on the same site is not loading in parallel.
    For example http://ukamebel.ru/products-page/elementyi-planeta-luna/ – you can see hot it loaded in parallel from static1-5.ukamebel.ru, but http://ukamebel.ru/products-page/detskaya-komnata/podrostkovaya-mebel/planeta-luna/ – is not loading in parallel :(
    Could somebody help ?

  130. [...] Easy CSS Star Rating Layout | PHP, CSS, HTML, Web & beyond Jul 24, 2009. Hi Jose, so this is exactly what I am looking for for my wine blog as I use a 5 star rating system. Can use this in blogger? If so, how? Easy CSS Star Rating Layout | PHP, CSS, HTML, Web & beyond [...]

  131. Trenaldsza says:

    Why have you taken out my post? It was very useful
    information and i guarantee atleast 1 person found it helpful
    unlike the rest of the comments on this web site. I’ll post it
    again. Sick and tired of getting low amounts of useless visitors
    for your site? Well i wish to tell you about a fresh underground
    tactic that produces me personally $900 per day on 100% AUTOPILOT.
    I could be here all day and going into detail but why dont you
    merely check their site out? There is really a excellent video that
    explains everything. So if your serious about making easy money
    this is the website for you. Auto Traffic

  132. Daniel says:

    great post, thanks for sharing

  133. Jenny Stepman says:

    It is very interesting for me to read this blog. Thanx for
    it. I like such themes and anything that is connected to this
    matter. I definitely want to read more soon. Jenny Stepman escorte girls

  134. Tero says:

    I just tried this, and with Firefox it works like a charm.
    However, with IE and Chrome, I get 0% (all empty) no matter what I
    do. Is it browser problem, or can I fix it in HTML?

  135. This is getting a bit more subjective, but I much prefer
    the Zune Marketplace. The interface is colorful, has more flair,
    and some cool features like ‘Mixview’ that let you quickly see
    related albums, songs, or other users related to what you’re
    listening to. Clicking on one of those will center on that item,
    and another set of “neighbors” will come into view, allowing you to
    navigate around exploring by similar artists, songs, or users.
    Speaking of users, the Zune “Social” is also great fun, letting you
    find others with shared tastes and becoming friends with them. You
    then can listen to a playlist created based on an amalgamation of
    what all your friends are listening to, which is also enjoyable.
    Those concerned with privacy will be relieved to know you can
    prevent the public from seeing your personal listening habits if
    you so choose.

  136. Tero says:

    I copied the css part 1:1 to my main css file, also the html was 1:1 copy, and it does work on FF. Can’t figure out why not IE/Chrome.

    Your email (below) didn’t seem to work. Could you pm me on my email, so I can provide you more details?

  137. Nona Mills says:

    Thank you VERY MUCH Jose for this addon!!! Could you please also tell us how to print the SKU for each product variation (on the checkout page for example). Thank you! Ciprian

  138. [...] Easy CSS Star Rating Layout | PHP, CSS, HTML, Web & beyond Jul 24, 2009. Hi Jose, so this is exactly what I am looking for for my wine blog as I use a 5 star rating system. Can use this in blogger? If so, how? Easy CSS Star Rating Layout | PHP, CSS, HTML, Web & beyond [...]

  139. Norma Vargas says:

    (I’m running version by the way)

  140. Most of the times i visit a blog i get disappointed. On the contrary,I have to say that you have done a good job here.

  141. Very Nice website. I built mine and i was looking for some ideas and you gave me a few. The website was developed by you?


  142. Issac Maez says:

    This is an excellent post.

  143. I copied the css part 1:1 to my main css file, also the html was 1:1 copy, and it does work on FF. Can’t figure out why not IE/Chrome. Your email (below) didn’t seem to work. Could you pm me on my email, so I can provide you more details?

  144. Great post, I believe blog owners should acquire a lot from this web blog its really user pleasant.

  145. Pierinux says:

    Hi Jose, thank you for sharing this trick, I tried it and it works perfectly. And thanks for sharing the wp-restful plugin. Please, if you develop any further rest-based plugins keep them posted. I will try to develop something based on your infrastructure, if I succeed of course I’ll post back. Cheers

  146. Great article. Waiting for more.

  147. Hello Melanie, You can email me to me@joseairosa.com.

  148. I like this site because so much useful material on here : D.

  149. I agree with your points , great post.

  150. I’ve got to write about this for a class I’m taking, well related to this. This really made it easier for me , so thanks you A TON.Regards, Young Baichan

  151. Quentin Clem says:

    excellent stuff. Do you have an RSS feed? And will it be cool if I added your feed to a blog of mine? I have a site which brings content from RSS feeds via a number of sites and I’d like to add yours, the majority of folks don’t mind given that I link back and everything but I like to get authorization first. Anyway let me know if you could, thanks,Regards, Quentin Clem.

  152. Great article. Waiting for more.

  153. It’s so simple . He hasn’t closed tag div
    From :

  154. Mirta Rozon says:

    Great site you have here, it’s nice to see someone else thinking like me..

  155. Great article. Waiting for more.

  156. Kit Wingler says:

    I am continuously browsing online for articles that can benefit me. Thank you!

  157. Paisaremmah says:

    Les hele bloggen, ganske bra

  158. A great post, thanks for taking the time to share, continued success to your site in the future!

  159. Awesome blog, interesting posts and very good content you got here.

  160. Hello.This article was really interesting, particularly because I was browsing for thoughts on this topic last Friday.

  161. paketresor says:

    Keep up the great work on the site. I love it. Could maybe use some more updates more often, but i am quite sure you have got other things stuff to do like we all do. =)

  162. Cool article. It’s about time to find interesting content for a change.

  163. Biaxin says:

    I admit, I have not been on this webpage in a long time… however it was another joy to see It is such an important topic and ignored by so many, even professionals. I thank you to help making people more aware of possible issues.Great stuff as usual.

  164. I saw another thing about this on another blog. Youve obviously spent some time about this. Congratulations!

  165. Vinny says:


    Do you think this code may be used to help with a site that has numerous reviews? Allow me to explain, I am trying to develop some code that will take a 5 point rating system, develop a star code and create a star rating based on a the 5 point rating. For example, a 3.72 out 5 rating would create a 5-star rating that has 3.72 of the stars shaded. Do you think this would accomplish the task?

    • Yes, perfectly. You just need to a apply a simple math to the % calculation.

      Lets say you want 3.72 out of 5. You would do a (3.72/5)*100 =~74%

      Let me know if you need anything else.

  166. resor says:

    i have begun to visit this cool site a couple of times now and i have to tell you that i find it quite nice actually. continue doing what you’re doing! ;)

  167. Vinny says:

    how would i add this into a template folder that could populate the information?

  168. Greg says:

    Anyone know if this patch works with 3.7.8?

    • Hello Greg!

      I don’t know how much of the code was changed but I wouldn’t adventure in applying the same patch to the newest version.

      I will try to post an updated version that will work.

  169. Greg says:

    Thanks José. Appreciate it! Anyway to subscribe to this thread so I get emailed when you’ve posted an updated patch?

  170. Erika says:

    An update release would be AMAZING! Really! A life saver for two stalled out client website that I can FINALLY complete. You are the ONLY person working on this issue. SO EXCITED — I will watch this site for your update. YAY!

  171. Erika says:

    Maybe this weekend?

  172. Francisco says:

    Man if you can release the update soon it would be great, you would be saving me!
    I’ll try to watch this thread for updates
    Thank you!

  173. Car says:

    The core REST plugins work (posts, comments), but when I try to activate any of the wp-restful plugins they are unable to find wpr_add_plugin or wpr_add_pluralization. Any suggestions to fix this?

  174. Hi. I’m having same problem as Xbitz.

    ‘That sub-domain is returning an HTTP error. I cannot add it knowing it will not work.’
    ‘Sub-Domain Health: HTTP/1.1 404 Not Found’

    I added subdomain via cpanel on Hostgator VPS.

    ‘cdn1′ folder is 0755, files within are 0644 and include .htaccess index.php load_image.php

    Any suggestions?

  175. Carl says:

    I moved the wpr_add_* methods to be inside the function that is hooked into the activate_* action and they work now.

  176. I was thinking it could possibly be related to something in htaccess. Would you be willing to look at my htaccess file if I could send it to you?

  177. Buslink30 says:

    Created two unique subdomains in cpanel, installed and activated plugin, Settings were all (green) ok. , but then when I went to open my website, I had small white questions marks on a blue background all over………what did I do wrong ??? Thanks for your help…

  178. Buslink30 says:

    okay, thanks, I have some more info. My site uses W3 Total Cache and I have CDN enabled with MAXCDN…however, I disabled this W3T Cache and empied all caches including Browser caches….

    I tried enabling Wt3 and then enable wp-pls, site content was viable for about a minute, then the question marks returned. I’ve disable wp-pls, emptied caches on Wt3, and I’m back to where I started.

    I’m not sure if you need my .htacess, if so how do I forward to you, email ?


  179. [...] un po’ di ricerche online, ho trovato un sito web che proponeva una soluzione, non più adatta però alle ultime versioni del plugin. Fortunatamente [...]

  180. Buslink30 says:

    Just following up…any assistance would be appreciated !! I’m still interested in giving this plug in a try…I don’t know if you need anything from me, and if so how I can send it to you…. thanks

    • Hello! I apologize for the time that has been taking me to reply. I’ve been stuffed with work lately and it has been impossible for me to attend all the emails. I’m sorry for that and I will try to take a look and reply to them on the weekend.

  181. New version is out as requested! It was earlier than the weekend :P

  182. Erika says:

    Jose — do you have a list of features for your fix? As in, does the SKU pass thru to the checkout page? Does the SKU pass thru to the Purchase Receipt to the customer or to the store owner?

    Really excited about the update so far — but the customizations we paid for may not be included in this bigger upgrade feature you have done.

  183. Buslink30 says:

    No problem, let me know if I can help…thanks

  184. webQbe says:

    Hey JP, thanks for your plugin (I made an Italian article for it on my blog), but I have problems!
    I updated the database and the files I’ve just downloaded, and the field appears right next to the variation; I can specify a number of items per variation but when someone buy an amount of the variation the number doesn’t change! And if the costumer wants to buy something more of what is available (i.e.: The variation has 5 units in stock, the costumer asks for 10) it goes one with the transaction without any error/blocking message.
    Please help me because it’s important for a website I’m developing (you know, something about wearing… so tot. t-shirt with this color/size, tot. with another color/size, and so on… So I need your feature!). Thank you!!

    • Hello webQbe,

      This solution only gives you the ability to add SKU to variations. It does not (should not!) interact with the stock you have of that specific variation.

      I think this might be some other problem but I will take a look on my sandbox wp installation.

  185. Also interested in compatibility with W3 Total Cache. Also, add BuddyPress to that ;) If both work out fine, this could be a great resource for our website.

    We might also depend on proper NGiNX support, but I understand this could pose a big challenge. Whenever there’s any news of it, I’d love to hear about it though.

  186. webQbe says:

    Oh, I didn’t get that!
    If you are able to add a field that decreases the quantity when someone buys it, well it would be wonderful!!!
    I’m not so good in PHP & SQL, but I can help you developing it!
    Please notice me, even to my mail if you want ;)

  187. Wolfheinrich says:

    I installed this plug-in, installation and everything went fine. However, after I flushed my supercache and ran pagespeed again, it flagged my image files for failing compression, and when I look at the analysis, I noticed all of my already optimized images file that were served by the subdomain grew 3x in file size! A 110k image file grew to about 380k! What is happening here? I have since taken the plugin offline until I understand why.

    • Hello Wolfheinrich,

      It’s very strange that this happening… I never had a similar problem and on the contrary the images always should get smaller.

      Can you tell me if you’re using any other PHP GD dependente plugins?

  188. NT says:

    Hi I got the below error. How can this be fixed?

    Fatal error: Call to undefined function getallheaders() in “wp-restfullibOAuthRequestVerifier.php” on line 88

  189. ali says:

    I tried to install it the way you advice and went all alright but when I go to register the client, the server responds with a page not found. I am using wordpress 3.1 do you think it might be a problem of the new version?


    • Hello ali,

      Haven’t had the time to test in on WP 3.1.

      I am however working on a new version with a rebuilt engine and OAuth2. It will take some time, but i think it will be a great improvement.

  190. Jeff says:

    Hi José,

    Is it possible to display the variation SKU in the checkout? I appreciate the work you’ve done on this mod. Thanks!

    • Hello Jeff,

      Yes, it is certainly possible.

      Just call this function where ever you like in you checkout template: cart_item->product_id,((is_array($wpsc_cart->cart_item->variation_values) && !empty($wpsc_cart->cart_item->variation_values)) ? current($wpsc_cart->cart_item->variation_values) : 0 )); ?>

      Take note:
      - You must call this inside the wpsc_cart loop

  191. webQbe says:

    …JP? I really need this feature! It’s so hard to develop it? u.u Please let me know!

  192. webQbe says:

    Ah ok no problem! Sorry if I’ve been pressing :)
    Send me an email when you want to!

  193. Buslink30 says:

    Hello Jose,

    I wasn’t aware until I read your comments above that this plugin is not W3 Total catch compatible.

    Since that plugin ROCKs with 300,000 downloads and a 5 star rating, almost everyone who wants performance has the plugin installed. I have been using it with MAXCDN and I think that is why your plugin is not working.

    I read that setting up parallel loading will improve site performance with W3 Total Cache, and I’m looking forward to your ‘new feature’ list when you have the spare time…I’d be willing to beta test it when you’re ready to make it compatible with that 300,000 W3 TC market …it’d be a killer combo…

  194. Jeff says:

    Thanks José,

    I’m not sure how to implement the function you supplied – do I create a function somewhere else and call it in my shopping_cart_page.php file or do I place that code directly in the shopping cart file?

    Would it also be possible to display the variation SKU on the single_product.php page and have it update when different variations are selected just like the price updates? Thanks again!

  195. webQbe says:

    Ok, ok JP! No more problems, I resolved the whole thing. Thank you very much! :)

  196. Alex says:

    Hi José,

    Thanks for sharing this. I’m also thinking about how to this plugin might interact with other REST sources of information.

    Looking forward to seeing your next exciting development.

  197. Marie says:

    Hi José,

    We are looking for WordPress Bloggers to test our new WordPress Plugin : Tweet & Get it !
    and we think that joseairosa.com is a good website to test it.

    The plugin allows you to create a download button , which will hold the file you want to make available for download.
    In exchange for the file the user will have to:
    1. send a tweet (priorly defined by you)
2. follow your Twitter account

    If you download it, you will have a demo of what the plugin exactly does :

    Don’t hesitate to contact us if you need support to install it.

    Let me know what you think about it ? ;)

    Best Regards,
    Marie de Ubeda
    Tweet&Get it !
    Follow us on Twitter !

  198. Tyler says:

    Thank you so much for this tutorial. I have been seeking top understand mod_rewrite for months now but tutorials I found either just weren’t something I could understand or were not effectively communicated.

    My only question is that on urls if I include the forward slash at the end of the url, such as example.com/helloworld/ the html loads but not the css. It all loads fine without the forwardslash at the end. Any idea what I may have done wrong. If I understand correctly, in ^([a-z]*)/?$ the ? says the forwardslash before it can or can not be there. And this is how I have it.
    Again, thanks for this awesome tutorial!

  199. Konrad says:


    Thank you so much for this plugin. Unfortunately, when accessing the API page I too get the error message “The requested URL /api/register/ was not found”. Before diving in, I wanted to ask you if you ever figured out what the problem was.

    Any leads would be much appreciated.

    All the best,

  200. simonly says:

    Is there any drawbacks for installing this plugin. Has any one noticed any bugs or issues?

  201. aarphel says:

    Does anyone have any news on this problem:

    Sub-Domain Health: HTTP/1.1 404 Not Found

    I’ve followed all the instructions to the letter, and I’m still getting this error message.

    I’m having problems loading my site in ie7 – the worst browser ever (if it can even be called a browser that is) it downloads all the files first and only then it renders the page, instead of rendering it on the fly.

    Because of that, I would opt to manually load some of my images into subdomains and call them with the different url (e.g. img1.mysite.com/someimage.png).

    But I’m not sure if I’m able to cache the images this way.

    Any ideas and thoughts will be more than welcomed.

  202. BrettDz says:

    @José P. Airosa – My SKU’s do not save into the form fields… I tried adding the code from @Milos and still they do not save.

    Is there a fix?

  203. [...] a knowledgeable and hosting is not always possible to install successfully. However, you can go here for detailed [...]

  204. IBuzzyou says:


    I face a problem with the plugin the plugin isn’t compatible with BuddyPress or W3 Total Cache ?

    And the plugin work well but some images that i add manually in my sidebar doesn’t shows anymore…

    Can you help me via email ?

    Thank you in advance.

  205. Milan says:

    Tell me about ini_set must be enabled or not..
    Im create subdomain and im active subdmain but simple image cant display
    Now im found in subdomain folder error_log with this

    [27-May-2011 19:28:33] PHP Warning: ini_set() has been disabled for security reasons in /home/…../….

    So ini_set() must be active on server or what can be problems ?

    • Hello Milan,

      In fact ini_set should be active. If you can send me more details through email and / or ftp access I can check the plugin directly and make any changes that are needed.


  206. Jesse says:

    Hi Jose, Great tips!!! However, I tried to apply everything you said to my website (guest book) but it’s not working :(

    Could you please help me get this done? Thanks so much!!!

    • Hello Jesse,

      Can you give me some more information on the problem? Are the images no showing? Can you provide me with a link to your website so that I can check code-wise?

      Thank you.

  207. Milan says:

    @José thank you for answer..
    Im disable line 3 and 4 in load_image.php and now works without ini_set … interesting but works…

    Here is your plugin live http://arena18.com/ is help me alot to speed up this site…


  208. Milan says:

    Yea , was a problem with my host now its okey..
    Its avalible to use this script on other sites and forums, not only for WP ?

  209. Just a quick way to add the sku field to the database:

    query(“ALTER TABLE wp_wpsc_variation_properties ADD sku VARCHAR(64);”); ?>

    Add that to your header.php file load your page once, then remove the line.

  210. Matthew says:


    I too am having issues with the code below:

    Fatal error: Call to undefined function getallheaders() in /SERVER_PATHS_HERE/wp-content/plugins/wp-restful/lib/OAuthRequestVerifier.php on line 88

    I then tried adding the code below to my functions.php file:

    if (!function_exists(‘getallheaders’))
    function getallheaders()
    foreach ($_SERVER as $name => $value)
    if (substr($name, 0, 5) == ‘HTTP_’)
    $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
    return $headers;

    That caused this error on the /api page:

    Warning: Cannot modify header information – headers already sent by (output started at /SERVER_PATH_GOES_HERE/wp-content/themes/twentyten/header.php:15) in /SERVER_PATH_GOES_HERE/wp-content/plugins/wp-restful/lib/REST.inc.php on line 669

    Warning: Cannot modify header information – headers already sent by (output started at /SERVER_PATH_GOES_HERE/wp-content/themes/twentyten/header.php:15) in /SERVER_PATH_GOES_HERE/wp-content/plugins/wp-restful/lib/REST.inc.php on line 671
    Not Found

    The requested URL /api was not found.

    Thanks so much for any help!

    • Hello Matthew,

      Have you added the API page to the pages in wordpress?

      The error that you’re getting is because that particular code is being executed and trying to add header information after the headers have already been sent to the browser. So, in any case, this code should be executed before any output is sent to the browser.

  211. Matthew says:


    Thank you for your quick response!

    Yes, I have added the API page and the [REST_return] shortcode, and even refreshed Permalinks and installed a new blank boilerplate theme in case it was the template file…. I also changed the getallheaders() to emu_getallheaders() and added the function below:

    function emu_getallheaders() {
    foreach ($_SERVER as $name => $value)
    if (substr($name, 0, 5) == ‘HTTP_’)
    $name = str_replace(‘ ‘, ‘-’, ucwords(strtolower(str_replace(‘_’, ‘ ‘, substr($name, 5)))));
    $headers[$name] = $value;
    } else if ($name == “CONTENT_TYPE”) {
    $headers["Content-Type"] = $value;
    } else if ($name == “CONTENT_LENGTH”) {
    $headers["Content-Length"] = $value;
    return $headers;

    I might be going in the completely wrong direction… Sorry for the trouble… I really appreciate your help.


  212. Here’s a revised version:

    query(“ALTER TABLE ” . $wpdb->prefix . “wpsc_variation_properties ADD sku VARCHAR(64);”); ?>

  213. Malcolm Ross says:

    Thanks Jose for this plug-in but I am also having the Not Found issue on a version 3.1.3 of WordPress.. Any word on a resolution or update for this plug-in?


  214. C0nan says:

    Hey José

    1. Installed the Plugin
    2. Activated the plugin
    3. created API page with permalink

    When I type in the api permalink in the web,
    I keep getting the following error:

    Fatal error: Class ‘OAuthStore’ not found in /*****/*****/*****/wp-content/plugins/wp-restful/lib/REST.inc.php on line 809

    and when I type in the api/register, I get the registration form, but
    with the same ERROR at the bottom…

    Fatal error: Class ‘OAuthStore’ not found in /*****/*****/*****/wp-content/plugins/wp-restful/lib/REST.inc.php on line 809

    any Ideas?

  215. C0nan says:

    Hey José

    I have fixed the problem….

    I have one other plugin running:

    This plugin has its own aotoload functions, and overrides REST.inc.php ___autoload function by calling spl_autoload_register(“functionName”);

    the default ___autoload() stack is ignored if spl_autoload_register() is called, thus one has to add your autoload into this new stack,
    so by default I have made the following changes to REST.inc.php

    function wpr__autoload($class) {
    $found = false;
    @include_once ($class . ‘.php’);

    spl_autoload_register (“wpr__autoload”); /* Register __autoload. */




  216. Erik says:

    Great technique!

    say I use this to rate a blog post..
    25 people give 3 stars and 75 people give 5 stars.. will it automatically reflect that and show a rating of 4.5 stars?

    or do I need to do some scripting for that to happen?


    • Hello Erik,

      The only coding you need to add is the percentage in width for the stars filling. In that case, with really quick math:

      ((((25*3)+(75*5))/100)/5)*100 = 90

      That’s what your script should put on width.

  217. MuscleManiak says:

    How can i add on blogspot? i try to add css and html code but don t work:(

  218. Jas says:

    Hey, I came across this when I was looking for a way to use WP as a backend for mobile development. Particularly jqtouch & sencha. I can build a mobile ‘theme’ no problem but if I want to use lets say phone gap it will need to get the data via an API. Would you have advice on how to set this up using your plugin?

    Keep up the great work! You have a new follower!

    • Hello Jas,

      You can certainly use this plugin as a backend and that’s the main reason I developed this plugin.

      Since this plugins is built using OAuth you just need to find a Cocoa (iPhone) / Java (Android) library and use it to connect to your RESTful API.

      It should not be difficult to implement as integrating with OAuth is one of the most common tutorials to find on the web.

      Let me know if you run into any difficulties.

  219. Lee Grey says:


    I am getting the getallheaders() error, which you can see at http://leegrey.com/soae/api. I had my web host investigate, and they concluded that there is a problem in the plugin. They demonstrated that the call to getallheaders() itself works at http://leegrey.com/testgetallheaders.php.

    Can you please investigate why this function fails in your plugin? In my case, I have not required OAuth authentication in the server, my request does not contain OAuth headers, and I want to use a non-WP client to call the API. I just want a simple REST server.

    Thanks very much,
    Lee Grey

  220. nanopark says:

    your plugin is not work when image load from other server .

    TnQ for plugin.

  221. magia says:

    Wow! This can be one particular of the most helpful blogs We’ve ever arrive across on this subject. Basically Great. I am also a specialist in this topic therefore I can understand your hard work.

  222. I haven’t checked in here for a while because I thought it was getting boring, but the last few posts are great quality so I guess I’ll add you back to my everyday bloglist. You deserve it my friend :)

  223. Lawrence says:

    Hi Jose, I’m having the same issue reported above about the getallheaders() function being undefined. I spoke to my host and this was the response:


    getallheaders() is not native to php5. It was a php4 function and was available in php5 but only if php is installed as an apache module. php here is not an apache module but a compiled binary. getallheaders() did become available in php 5.4 but only on fastcgi. As we are currently running 5.2.17, it is not available. We have recently finished phasing out php4 completely so that is most likely where this is coming from. If you need a workaround for that function to work with your plugin, you could define it in your functions.php file or somewhere where the plugin you’re using would be able to see it. Here’s a url to a possible workaround:


    Otherwise, I would recommend contacting the plugin maker for an updated version of the plugin where that’s either defined or where it’s natively compatible with php 5 outside of fastcgi on php 5.4

  224. Lovell Larbie says:

    This is the ditty

  225. [...] You can find additional information about adding new sub-domains to your server administration system (cPanel, DirectAdmin, Plesk) by visiting this plugin homepage: http://joseairosa.com/2010/05/17/wordpress-plugin-parallel-loading-system/ [...]

  226. Anthony says:


    Works and looks great. I want something that they click on and it totals it up automatic and changes per opinion. I dont have a section on my site for comments but I want the site to reflect in the star rating an instant amount by them clicking on it and based on who rates what it will go up or down. Does that make sense? check my link to one of my pages with it:
    Thank you so much!

    • Hello Anthony.

      For that you must use Javascript and AJAX in order to:

      1- Know when someone clicks on the stars
      2- Call some php script (or other) and store that person vote

      This CSS star rating will need some adaptations in order to recognize each star individually.

      Let me know if you have any doubts.

  227. Deepetch says:

    I was searching for this long time, Hope this will help us to study our visitors reaction on our page.Thanks for sharing.

  228. Ramesh says:

    I am working on wp-ecommerce restful api’s using your plugin.. It seems the plugin is not ready for latest WP.. What is the expected date of release.. Thanks…

  229. Hiram says:

    Installed it today. Had some trouble getting it to recognize my subdomains (set up 3) and had to keep deleting .htaccess in order to log back in and trying the config again. Finally got it to work and it seems to be playing nice with all my other plugins.

    Nice work!

  230. Alex says:

    I have bug with loading plugin classes. Poblem was in __autoload function
    there is line:
    @include_once ( WP_PLUGIN_DIR.”/”.$wpr_plugin_folder.”/lib/”.$class . ‘.php’);

    but it just don’t work because $wpr_plugin_folder is bad. Example, Tags plugin is installed at ‘wp-restful-tags-plugin’ directory, but $wpr_plugin_folder is set to ‘wp-restful-tags’.
    I solved problem changing problematic code to:

    @include_once ( WP_PLUGIN_DIR.”/”.$wpr_plugin_folder.”-plugin/lib/”.$class . ‘.php’);

    Off course, problem can be solved with setting correct dir name in plugin install functions.

  231. Alex says:

    There is plugin: PostRESTController
    it has getPost() and getPosts() functions. So, it means that I can request via REST all posts or only one. I was reading code for past half an hour, maybe more, but I can not find that you implemented possibility to get only one post (or tag or whatever). I can get only all data.
    Do I miss soomething or should I modify your plugin so I can request only one particular post/tag/category

    Thank you

  232. Alex says:

    Hmm, I solved my issue in this way:
    Class WPREST in contructor, there are lines:

    if (strpos ( current ( $basename ), “/” )) {
    $array = explode ( “/”, current ( $basename ) );
    $this->setAction ( current ( $array ) );
    $this->setActionRequest ( end ( $array ) );

    You are using / as seperator, I just changed it to ; and now it is working just as I want it to work

  233. Alex says:

    In wp-restfull/wp-restfull.php you have a lot of closing th tags () but no opening one :S

  234. Alex says:

    Also, you are using function check_for_trailing_slash(), 5 times, that do not exists in WP nor in your plugin. It should be wpr_check_for_trailing_slash()

  235. Alex says:

    and sorry for spamming with comments :(

    • Hello Alex.

      You should be able to request a single post with /post/id.json or xml

      As for the closing tags, I will check if there’s a problem with them.

      The function check_for_trailling_slash() should be, as you said, wpr_…
      Thanks for pointing it out!

  236. [...] een REST API plugin kunnen koppelingen worden gemaakt, die een rechtstreekse dataverbinding mogelijk maakt met [...]

  237. P Karthikeyan says:

    Very good tutorial, Thank you so much….

  238. mohd saqib says:

    Nice code…. I need to use star rating in one of my company’s site…. while browsing I got it… looking so easy… but even after reading all the comments too… I could not understand that It is a static star rating OR dynamic one…. I mean to say… that how users will click on stars if and if someone will click on it… and then how we will know the users likes… and do we have to change the % value manually every time for every post???

    Please reply…

    thanks in advance

  239. tudou99 says:

    This is very attention-grabbing, Youre an excessively expert blogger. I’ve joined your feed and sit up for in search of extra of your great post. Also, I have shared your web website in my social networks!

  240. Łukasz Antowiak says:


    I guess, I should try to check this out by myself, but is it possible to use this to put a new post, or is it only readonly? :)

  241. Susan Silver says:

    I keep recieving a 404 error when I try to activate my subdomains on the wordpress plugin screen. How do I correct this? I don’t know much about development type stuff.

  242. jimario says:

    I’m getting this message in the plugin’s config page:

    You are using WP-PLS with Simple Method. Using this method I might not able to check for the existence of both .htaccess and load_image.php.
    Please check this manually.

    I’m also getting this:

    Sub-Domain Health: HTTP/1.1 302 Moved Temporarily

    I have .htaccess in my root directory. However, I don’t know where to find load_image.php. Why am I getting a 302 error? Please help.

  243. jimario says:

    Hey, I got this working. However when I analyze with Page Speed, it says that the site is not parallelized. What gives?

  244. Kudos for any great article. We are glad I’ve got taken enough time to understand this.

  245. Loriel says:

    I am in the process of building a website that will require multiple images (each with their own rating). I use Dreamweaver to build the sites and am looking for a star rating system. I see the code and the stars and can copy them into my site but how do you make it work? I want viewers to be able to rate and comment on each item as they wish. Maybe it is very simple but I am lost.
    Thanks for any help.

    • Hello Loriel,

      This star rating system is only CSS and HTML based, which means that it’s static. You need to use some dynamic language coding (like PHP) in order to implement an interactive rating system.

  246. Ok, how do you put this on a wordpress site? if on editor where? Dating Sites Info It worked perfect on dreamweaver, i just need to know where do i paste the code on the editor. Thanks.

    • Hello Emily,

      Like I said on previous comment, this is only a static method that you can apply to any web language. In your case, since you’re using WordPress, you must complement it with a PHP plugin that will take the vote of a given user and then calculate the appropriate rating.

  247. I did it on a wordpress theme but its showing only empty stars, i don’t know maybe is the theme.
    Dating Sites Info Any help would be appreciated. Thanks.

  248. I am getting these errors:

    Warning: get_headers() [function.get-headers]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home3/dragonb2/public_html/wp-content/plugins/parallel-loading-system/wp-pls.php on line 147

    Warning: get_headers(http://dr1.dragonblogger.com/wp-content/plugins/parallel-loading-system/check_headers.jpg) [function.get-headers]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home3/dragonb2/public_html/wp-content/plugins/parallel-loading-system/wp-pls.php on line 147

    Warning: current() [function.current]: Passed variable is not an array or object in /home3/dragonb2/public_html/wp-content/plugins/parallel-loading-system/wp-pls.php on line 152

    http://www.dragonblogger.com is my main site, and I created subdomains dr1.dragonblogger.com and dr2.dragonblogger.com

    It looked like maybe DNS isn’t resolving which is freaking out plugin but I waited several hours and DNS seems to resolve from my host provider and everywhere else.

  249. Josh says:

    Well, i’m about to uninstall this plugin. I’ve created sub domains and tried to set this up but it’s not working. It’s telling me the domains are not there when they are OBVIOUSLY there because I just created them. Something is wrong with this script.

  250. JennAtFFP says:

    I tried installing this plugin today and I get an error message. The warnings suggest there’s something not jiving between the plugin and the theme I’m running (?). I’m using the default WP Twenty Eleven theme so not sure what I should do.

    BTW-I can’t get the image to preview (http://parallel1/wp-content/plugins/parallel-loading-system/check_headers.jpg) so maybe there’s a problem with my subdomain but I followed all the directions to the letter. I’ve tried to redirect the subdomain to the http:// version to be sure it’s correct but nothing seems to work. What am I doing wrong?

    Warning: get_headers() [function.get-headers]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/jenrik06/public_html/wp-content/plugins/parallel-loading-system/wp-pls.php on line 147

    Warning: get_headers(http://parallel1.frugalfrontporch.com/wp-content/plugins/parallel-loading-system/check_headers.jpg) [function.get-headers]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/jenrik06/public_html/wp-content/plugins/parallel-loading-system/wp-pls.php on line 147

    Warning: current() [function.current]: Passed variable is not an array or object in /home/jenrik06/public_html/wp-content/plugins/parallel-loading-system/wp-pls.php on line 152


  251. jimario says:

    Hi, I had moved on for awhile and recently came back to try to make this work. It seems to be working according to the sub-domain health report the plugin generates. I’m getting “OK” report on all 4 of my subdomains. However, when I run Page Speed on GTmetrix.com, I get an “F” for “Parallelize downloads across hostnames”. That report then lists the many files that haven’t been parallelized.

    The page of my site that I test is is http://choochooclan.com/products-page/prints . The report states that 30 jpg’s need parallelizing among a host of other png’s and gifs. however, the page actually has about 60 jpeg thumbnails. Does this mean that the 30 images not showing up in the report are actually being parallelized by your plugin? Shouldn’t the plugin work on all the images of a page?

  252. Alice says:

    Very very useful. Thanks you : )

  253. jimario says:

    Hey, I haven’t seen a response to my post almost 10 days ago. are you there?

  254. Anonymous Coward says:

    Your bit.ly link is 404ing.

  255. Anantha says:

    I looked at the plugin and it says it is compatible uptil 3.05 of wordpress, I am running wordpress version 3.2.1, will the plugin work in this version?


    • Hi Anantha,

      I know it’s been a while since your answer. I’m sorry about that.

      There were some changes on version 3.2.1 that might render this plugin unusable under certains circumstances. I would not advise it.

  256. Alex says:

    Awesome plugin. Are you still actively working on it? I was pretty excited when I found it, but I’ve hit a rut and I’ll probably need to use another plugin.

    Right now on my API Server, I’m getting the following error:
    The requested URL /api/ was not found

    Even though the page itself loads up – in the page content area this error is displayed.

    I think it’s likely a plugin conflict because I setup a testing server with the same permalink settings and everything, and it worked on the other server.

    Is there a list of plugin conflicts? Here’s the plugins I currently have setup on the API server I’m trying to create:
    All in One SEO Pack
    Batch Categories
    Breadcrumb NavXT
    Comments Notifier
    Contact Form 7
    Example Widget
    Executable PHP widget
    Google XML Sitemaps
    Improved Include Page
    Include It
    Kimili Flash Embed
    Members Only
    Microkid’s Related Posts
    Peter’s Login Redirect
    Register Plus Redux
    Results count
    Search Meter
    Search Suggest
    Shortcode Exec PHP
    Simple 301 Redirects
    Sort Query by Post In
    UberMenu – WordPress Mega Menu Plugin
    Ultimate Noindex Nofollow Tool
    User Role Editor
    W3 Total Cache
    Widget Logic
    WordPress HTTPS
    WPDB Profiling

    Running WP 3.2.1.

    On the client I setup, I also get the following error:
    Fatal error: Call to undefined function getallheaders() in []/wp-restful/lib/OAuthRequestVerifier.php on line 88

    • Hi Alex,

      Thank you. At this point i’m not actively developing the plugin just because my personal time has been greatly reduced since I took my new job in London.

      I would either recommend forking it on github and try and make some changes to get it working.

  257. Cassandra says:

    Great tutorial,
    thank you so much!

    Regards Cassandra

  258. Thys says:

    Hi Jose, is the:

    REST.inc.php on line 809 issue sorted on the server side and the OAuthRequestVerifier.php on line 88 on the client side?

    Please let me know.

  259. Hanan Ali says:

    Many thanks, your code worked perfect !!! excellent job

  260. Rua999 says:

    Works a charm, thanks for sharing my friend :)

  261. Avinash says:

    I’am using YARPP templates, pulling out images thumbnails and resizing using timthumb, but for some reason the images are not getting rendered on the post pages. Your help would be helpful

  262. [...] kiezen om paywalls achter de API toegang te zetten. Er is een andere WordPress plugin genaamd WP-RESTful die dergelijke mogelijkheden heeft ingebouwd. Helaas kreeg ik hem op mijn server niet goed [...]

  263. MJ says:

    Excellent, just what I needed!

  264. premal says:

    Hi Jose,

    so i looked at the first video and got a bit confused? You mention that primary usecase of using the REST api via mobile apps.. but here you have shown the client as another website ? Would the steps be any different if the client is android or iMac ? can you post another video on same ?


    • Hi Premal,

      You can use in both situations basically. REST api is a way to expose the data from your website/app to the outside world via a controlled layer. So with the example I’ve give I would consume the data from my own blog, but I could also use it with an iPhone app in the same way.

  265. VIKAS says:

    tried in local
    cannot see anythng

    Untitled Document

    .classification {
    position: relative;
    width: 91px;
    height: 17px;
    .classification .cover {
    position: absolute;
    background: transparent url(img/stars.png) top left no-repeat;
    top: 0px;
    left: 0px;
    width: 91px;
    height: 17px;
    z-index: 101;
    .classification .progress {
    position: absolute;
    background: transparent url(img/stars_full.png) top left no-repeat;
    top: 0px;
    left: 0px;
    height: 17px;
    z-index: 102;

    pls help

    I want an article to be rated and on mouseover the stars to be highlighted
    at end store this rating
    pls help

  266. cher says:

    Thanks for the excellent tutorial. As per my requirement, I would like to have this star rating in the right side of the page. Could you please help me to design it.

  267. Suren says:

    Superb post .

    Its very useful and so simple.

    Thanks for the post

  268. Udhaya47 says:

    Will it be compatible with both IE and firefox

  269. Jessica says:

    Hi José, can you explain which changes in 3.2.1 might render the plugin unsuable? I need to get a REST api going on my wordpress site very quickly and am thinking about using your plugin as a starting place, but knowing what that issue is before I start would be very helpful. Thank you!

  270. David M says:

    I’m having problems getting this plugin to work with animated images (.gif). The image won’t animate unless I deactivate the plugin. Any ideas why this is happening?

  271. Haeri says:

    PLS help me! I’m using the Web hosting Platform called Jimdo. There I can ad a HTML block and Pictures but I have no Idea how to get the CSS cod in there… Pls this rating system is exactly what I need, but I can’t get it to work.
    Regards Haeri

  272. Mathan raj says:

    Great work … helped me a lot.. thanks..

  273. Tim says:

    Will this allow me to make API calls to get get data feeds to my blog such as coupon codes, deals, products, etc…? They just say I need to interact with Restful API…

  274. nagarajan says:

    Hey its awesome man !! thanks for wp-plugin

  275. Ronak Shah says:

    Hey! Even I need to add star (including partial ones) ratings on my blog, but blogger has only html. So what do I need to do? And what code do I copy where? I don’t know anything at all. Thank you.

  276. Webface says:

    Hi I am having difficulty setting up this plugin for what I need. I was hoping to create a service that I can connect to from a mobile app Im working on.

    I installed the WP Restful
    Created the Page “/api” with the shortcode [REST_return]
    Server is on and active……….. Im stuck

    Client Settings says :”In this section you can manage your connections, as a consumer, to other blogs (servers).” This cant be option. I need to connect from my mobile app dev location to the REST service>

    Kinda new at this REST stuff so pls bear with me.

    How do I set up so the mobile app can access the service. The info says it can be done

  277. webface says:

    “So with the example I’ve give I would consume the data from my own blog, but I could also use it with an iPhone app in the same way.”

    – Can you give some step by step instruction on this? I have been battling with this for hours

    – How do i register a mobile app to get data from here?

  278. Hi! I’ve tried downloading the code, but it results in a 404. Could you provide an updated download link? Thanks!

  279. steve says:

    thanks buddy!

  280. Mixa says:

    So, where i sthe file? The bit.ly link is broken…

Leave a Reply to webQbe