Installing WP-CLI on XAMPP for Windows

Globally installing the PHAR involves the same procedure as manually installing PHPUnit or Composer on Windows.

1. Install XAMPP for Windows into e.g., C:\xampp

2. Append ;C:\xampp\php to your PATH environment variable
( Start –> Control Panel –> System –> Advanced System Settings –> Environment Variables )

3. Download wp-cli.phar and save the file as C:\xampp\php\wp-cli.phar

4. Open a command line (e.g., press Windows+R » type cmd » ENTER)

5. Create a wrapping batch script (results in C:\xampp\php\wp.cmd):

C:\Users\username>  cd C:\xampp\php
C:\xampp\php>  echo @php "%~dp0wp-cli.phar" %* > wp.cmd
C:\xampp\php>  exit

6. Open a new command line and confirm that you can execute WP-CLI from any path:

C:\Users\username>  wp --info
PHP binary:            C:\xampp\php\php.exe
PHP version:           7.0.1
php.ini used:          C:\xampp\php\php.ini
WP-CLI root dir:       phar://wp-cli.phar
WP-CLI packages dir:   /.wp-cli/packages/
WP-CLI global config:  
WP-CLI project config: 
WP-CLI version:        0.23.1

7.(optional). For MingW32 (that comes with Git for Windows) shell environment, save the file as wp (in C:\xampp\php ;without .phar extension)

bash: wp: command not found
bash: phpunit: command not found
bash: phpcs: command not found

Your own RetailMeNot in few minutes

Have you ever thought how the RetailMeNot is working?
How do they earn, and where from they getting all of these promotional offers?

If so, then welcome to my world, world of WordPress and… not so fast 🙂
(being a little bit more serious, please go though this quick guide below)

Behind RetailMeNot there isn’t any big mysterious secrets, website like theirs you can setup in few minutes using the most popular WordPress CMS, and the powerful Clipper application theme from AppThemes.

Clipper Coupons Theme

What the hell is WordPress?!
Well, if you asked that question, you probably will need a bit more of time than mentioned few minutes in the title of this article, and if you are totally new to website building, you might need also help of some web developer, „WordPress Web developer” to be clear 😛 Google for it, or click the contact tab on this website.

And what about Clipper?!
Clipper is a powerful application theme for WordPress CMS. It was built having in mind simplicity, so with just a few clicks you can create a „clone of RetailMeNot” website… maybe not so much a clone as they both looks differently, but functionality is very similar, looking at the Clipper features list, it’s probably much way better, more advanced (see product page).

Look, look at me…
Psst… you can use child theme to make it looks similar to RetailMeNot, there are already few ready made child themes 🙂 yes, I know, probably its a Yet Another New Word for you with blurry meaning… don’t worry, you will get it all 🙂

Where from pull content?!
OK, I have created website using WordPress and Clipper, say Yay! I have it! I have a nice looking website! 🙂
But wait, wait a moment… my website is nearly empty?! I have added some promotional offers that I have found over the internet, but it’s not enough, my website is still nearly empty?! Where from I can get promotional offers to fulfill my website?!

Where is money?!
Ohhh, and I almost forgot the most important point… where is the money?! How I’ll earn? Isn’t it all about earning money?

Well, yeah, I’m glad you asked 🙂 because that’s what I was working within last years, and would like to share with you, so you can do your business easier, much easier 🙂
But… before I’ll make you bored showing my products that you might need, I would like quickly show you the business model – easy, you almost there…

(to be continued 😉 ) btw. it seems to be my first tutorial alike post written in such „open” way 🙂

Available integrations with affiliate networks:
Commission Factory, CJ Affiliate, Daisycon, Rakuten LinkShare, ShareASale, Tradedoubler, TradeTracker, Visualsoft

CJ AffiliateCommission FactoryDaisycon

Rakuten LinkShareShareASaleTradedoubler


[WordCamp] Gdańsk 2012 – Overview

WordCamp Gdańsk 2012

I had this pleasure to visit WordCamp in Gdańsk this year. It was my first meeting, so until end I was not sure what to expect by presentations, which level, and type of people which will visit it as well.

I guess there is written already few relations from meeting, but unfortunatelly in Polish language, so in a few words I would like to share with others (non Polish) what about was presentations, and what catched my attention…

Check out agenda items (in Polish).

What was going on WordCamp in Poland?!

1. Daniel Dudzic „WooFramework” – speech was too general, no concretes, some people could find useful info about action hooks… as he explained later he was prepared that conference will visit mostly noobs.

2. Tomasz Dziuda „GravernWP Framework” – generally about features, how to start use it, experiences as group of people which started their career with Joomla, and things which they missed after moving to WordPress. In product itself I didn’t liked handling settings with JSON, in my opinion it should be changed to serialized array(s) in „WP Options” with filter hook to modify/extend settings.

3. Adam Selin about servers – informations which we should analyze while choosing server when ‚shared host’ stopped to be enought for us. Spoke about configuration and optimization, present benchmark results and how Varnish can decrease server load.

4. Marcin Pietrzak „Clean after yourself” – he didn’t said or show anything new, but reminded to all of us how important is cleaning, which problems may cause poorly written plugins, and show it really good on a example issue which they had on own website.

5. Marek Kowal „WordPress in – good speech about scalability and migrating to WordPress, explained clearly many various solutions and their positive and negative points. Speech was based on experience taken by handling 5mln blogs… as in previous speech about servers – the power of Varnish.

6. Łukasz Więcek „Earning on plugins” – many useful informations organizing plugins, how to separate plugin for free and paid version, pricing, and distributing in WP repository. Pointed list of things which we souldn’t do, to live with WP policy and moderators in harmony.

7. Michał Stanowski „Migrating blogs” – this one presentation get some negative feedback with which I’m not 100% agree. From my point of view, the bad point of presentation was that he didn’t mention at beginning default WordPress tools for exporting and importing data, and possible issues with serialized arrays by using ‚hardcode way’ which he presented.

8. Michał Żuk „E-commerce on WordPressie” – [CANCELLED]

9. Łukasz Rysiak „Google Analytics” – shows the technics of getting from GA something more then just information about traffic, example with tracking customer in cart, checking how many users really read articles, bounce rate, etc.

10. Paweł Pela „Annoying clients” – ways of filtering clients and orders based on examples from own life. Definitely some of them will need to implement, to escape mentioned requests like „building second facebook for 20 bucks” ;P

11. Arkadiusz Podlaski „Positioning WordPress” – roadtrip with SEO plugins, their correct configuration, ways to promote, microformats, etc. There was as well controversial summary „Links are more important than content” – I have to add „Life is brutal” ;P

12. Kim Gjerstad „Building a business around Wysija – good speech, part which catched most of my interest was about used ways to promote plugin, to ask client to „Rate”, „Share”, „Like” etc. after solving his issue, providing support.

13. Arkadiusz Stęplowski – remainded about good practices and mistakes we we often make

14. Katarzyna Karus „Usability in practice” – interesting comparison of 2 worlds User vs. Programmer, designing interfaces, helper tools

15. Cezary Buliszak „Accesibility” – about designing websites for people with disabilities, how website interact with ‚reader tool’, and mention ways to improve website accesibility without spending extra time

16. Konrad Karpieszuk „How much we earn?”it’s this what everyone was waiting for;) Konrad shows results from survey made on WP Zlecenia, data was sorted by various ways, and after all… looks like I’ll need to up my hourly rate;P

Hope to see you all on WordCamp WrocLove 2013!

P.S. I’ll need to finally organize some time to change layout of this blog ;P

[WP Plugin] WP-Orphanage Extended

Strona wtyczki na WP-Orphanage Extended
Strona projektu: jak na razie ten blog;)

Czym jest wtyczka WP-Orphanage Extended?

Wtyczka do promowania użytkowników bez określonej roli (sieroty), do roli z innych blogów w których się rejestrowali, lub domyślnej jeśli nie znaleziono.

Strona konfiguracji w panelu administracyjnym

WP-Orphanage Extended

Development Log
Subversion Repository

[WordPress] Get pagination to work on author page (author.php)


This post is not about adding WP-PageNavi plugin, but how to get it to work on author page.

Let say that we use in our WordPress 2 post types, one ‚post’ to write posts, and second ‚articles’ to write some articles…

Now, on author page we wanna list all posts and articles written author, show them in separate sections, and display cute pagination under sections to don’t load hundrets entries on one page.

We will query them using query_posts, as follow:

$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
// Query articles of author
query_posts( array( 'post_type' => 'articles', 'post_status' => 'publish', 'author' => $curauth->ID, 'paged' => $paged ) );
// ... some code to loop and print
// Query posts of author
query_posts( array( 'post_type' => 'post', 'post_status' => 'publish', 'author' => $curauth->ID, 'paged' => $paged ) );
// ... some code to loop and print

And everything should work fine until quantity of posts is bigger then articles, I mean pagination will work fine…

But if author will have for example written 5 posts and 15 articles, and we will try to get on page no. 2 – will see unfriendly 404 page!


Because author main query is just for posts, and parameter max_num_pages does not allow second page – so we need to extend author main query with ‚articles’ post type.

Add new function to your „functions.php” template file, and assign to action pre_get_posts

function custom_author_archive( &$query ) {
    if ($query->is_author)
        $query->set( 'post_type', array( 'post', 'articles' ) );
add_action( 'pre_get_posts', 'custom_author_archive' );

Now, if we will enter to author page, will see strange thing, pagination working fine but both loops, display both ‚post’ and ‚articles’… it happen like this because our added action override parametres in query_posts call.

So, if author main query allow us to get on page number 2, we dont need this action anymore to modify other queries too…

To do this add in top of „author.php” template file instruction to remove this action from any other calls:

remove_action('pre_get_posts', 'custom_author_archive');

Refresh your author page, and enjoy WORKING pagination!

Spolszczenie WordPress (3.3 i 3.3.1)

Strona projektu: lub

Czym jest WordPress?

WordPress jest nowoczesną, semantyczną, osobistą platformą publikacyjną, koncentrującą się na estetyce, zgodności z internetowymi standardami i użyteczności. WordPress jest zarówno wolny (od słowa „wolność”), jak i darmowy.

Prościej rzecz ujmując, WordPress jest tym, czego używasz, kiedy chcesz pracować, korzystając z oprogramowania blogowego zamiast z nim walczyć.

Spolszczenia publikowane są w polskim repozytorium WordPressa.

Jako że spolszczenie nowego wydania WP 3.3 dosyć długo nie pojawiało się w repozytorium i na stronie projektu, postanowiłem utworzyć tłumaczenie tej wersji, możesz je pobrać poniżej.

Spolszczenie WordPress 3.3 (1734 pobrania)
Pełna polska paczka WordPress 3.3 (1564 pobrania)
Pełna polska paczka WordPress 3.3.1 (2031 pobrań)

P.S. Panie Wacławie (lub inny członku polskiego teamu), proszę o dołączenie spolszczenia do repozytorium.

Spolszczenie Quality Control

Strona szablonu na Quality Control
Strona projektu:

Czym jest Quality Control?

Szablon Quality Control pozwala użytkownikom tworzyć bilety, przypisywać statusy, priorytety, kroki milowe, kategorie i tagi. Inni użytkownicy mogą następnie współdziałać z biletami, aktualizacjami statusów, etapami rozwoju, dodawaniem komentarzy i wiele innych.
W skrócie: Issue Tracking System

Spolszczenie Quality Control 0.5.2 (1290 pobrań)

[Git] Quick update of submodules

While taking new experience with using Git and manage projects with it, I wanted to save a lil time on updating submodules of project by using scribu solution (Easier way to update submodules in git), but it didn’t worked for me (perhaps because of different OS or Git version?!)… after quick research of „GitHub Help guide” we have got corrected working version;)

1. Normally we updating submodules with that sequence of commands:

cd framework
git checkout master
git pull
cd ..
git submodule update --init --recursive

2. So lets create „All in One” command (alias):

git config --global alias.up-sub '!f() { cd $1 && git checkout master && git pull && cd .. && git submodule update --init --recursive; }; f'

3. Now we can easily use „up-sub” command to update submodules;)

git up-sub framework

P.S. In above examples „framework” its a name of submodule

[ALT] Alternatively You can open ~/.gitconfig (WIN # C:\Users\xxx\.gitconfig) in text editor, and add at the end of file:

	up-sub = "!f() { cd $1 && git checkout master && git pull && cd .. && git submodule update --init --recursive; }; f"

P.S.2 All credits goes to scribu