How to Properly Redirect to a New Site using .htaccess

From time to we need to redirect an old site to redirect to a new site.

The good thing about the redirect snippet below is that that it will also append the parameters sent to the old site to the new one.
That is very important especially if you’re running ads or have links that have tracking parameters e.g.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^$
RewriteRule ^/?(.+)$1 [R=301,QSA,L]


How to Configure php Mail’s Function on Windows with Mandrill

Normally, php mail’s function doesn’t *work* on Windows because there is no sendmail server running by default.

Some people got it working using Fake Sendmail and Stunnel  & an external service such as Gmail/Yahoo, and others using msmtp.

I didn’t want my gmail or other credentials saved on the computer or a too complicated solution that may be hard to troubleshoot so I decided to use the Mandrill service to send emails from my development machine.

So the steps are the following

  1. Download Fake Sendmail
  2. Extract the archive contents in c:\usr\lib
    Important Note: if you’re running Windows 7 or 8 (not sure for Vista) you need to set XP Compatibility Mode. To do that right click on Sendmail.exe and click on properties and then enable XP compatibility mode (shown below).
  3. Edit php.ini (shown below)
  4. Signup for Mandril
  5. Create an API key (which will be your password) by going to Settings
  6. Configure Fake Sendmail (shown below)
  7. Restart Web Server or restart computer if that’s easier.

Enable XP Compatibility Mode on Fake Sendmail

Enable XP Compatibility Mode on Fake Sendmail

php.ini configuration (partial)

Fake Sendmail Configuration (Windows)
Make sure you edit the following.

  • default_domain=YOUR_DOMAIN_GOES_HERE

Note: if you’re configuring your own copy of the config file make sure you don’t use encryption i.e. smtp_ssl=none (as shown in the snippet). I’ve had no problems using the command line scripts, however, the php script would hang if Fake Sendmail used encryption.




How to Make an Ajax Request When Twitter Bootstrap Alert is Dismissed

How to Make an Ajax Request when Twitter Bootstrap Alert is Dismissed

Twitter Bootstrap is an awesome CSS framework which speeds the UI development a lot.

I worked on one of my products ( this weekend. I wanted to notify the user that their account has been upgraded. I wanted the message to be shown in the control panel. That’s in addition to the email confirmation.

I save the user specific message in a folder and if that file exist it is shown to the user.
The message will expire within 24hours but I wanted if the user dismissed the message so it is deleted.
That way the user won’t be bother with the message again.

The project uses Twitter Bootstrap 3.x so I used the dismissible alert which when clicked makes an ajax request to remove the message.

Here is a link to a working demo:





How to Map an Associative Array to HTML Element (Data) Attributes?

If you’re a developer (you are reading this so you are) you’ve used jQuery to access different elements from a page.

It is super convenient to set data attributes to given HTML elements.
For example:

You can use jQuery to loop through all of the containers with ‘app_container’ class but how are you going to
tell which one you’re currently processing? yes, you can use element’s ID for that but if we want to put more data into that element we can achieve id using data attributes which can be accessed like so:

var id = $(‘app_container’).prop(‘id’);
var type = $(‘app_container’).data(‘type’);

Here is a PHP class that allows you to create HTML attributes from a php array.
If you pass the second parameter the key will be prefixed with ‘data-’ prefix so they can be access via jQuery later.

Here is a link to the gist:

This version of Evernote Web Clipper is no longer compatible with Evernote Service

Today I opened my chrome browser and was greeted by an annoying alert box from Evernote’s Web Clipper Google Chrome Extension.

this version of evernote web clipper is no longer compatible with evernote service

I’ve tried clicking OK and also ticking the “Prevent this page from creating additional dialogs” checkbox but still no success.

I had to simultaneously be pressing ESC key and right clicking on the Web Cliper’s icon.

I created a video how to remove Evernote’s Web Clipper from Chrome while seeing error: “This version of Evernote Web Clipper is no longer compatible with Evernote Service


How to Change Your Email and Password

In may be hard to find on the link to edit your email and password.
Normally, you’d expect the edit link on to do that but you have to go to a different location.

  1. Make sure you are logged in.
  2. Then visit link:

Video tutorial


7 Things You Should Always do When Starting a New Project

Starting on a new project is an exciting thing.  Since, I am in the web/mobile development field this article is more applicable to those in the IT industry.

I’ve compiled a list of good practices that are very important. I’ve done some of them and forgotten about others and the results were less than optimal.

These the things that I should always be part of every freelancer’s (or business) processes.

Here are 7 Things You Should Always do When Starting a New Project:

  • Request an initial deposit before doing any kind of work
  • Start with a clearly defined project scope
  • Sign a contract & tell the client what to expect
  • Block time to work on the project at least 3-5 hours each day
  • Provide weekly update
  • Setup a test staging / site (on your own server)
  • Track your time


Request an initial deposit before doing any kind of work

This one is my favourite ( Canadian spelling, not a typo ;) ). By requesting an initial deposit you save yourself a lot of trouble. This has so many benefits. This is a great test to see if the client is ready to buy/hire you or if they are just shopping around.
When a client pays you the inital deposit you know that that person has some business background and/or will respect your processes.
You want to work with people who respect you and your processes.
Let your competitors have the bad clients.

Start with a clearly defined project scope

This one is very very very important. Ask as many details as possible when you interview client for the project details. Then create a nice itemized list of deliverable so both parties are 100% clear on what to expect at the end of the project.

Related: Checkout this WordCamp presentation by Lisa Sabin-Wilson on Scoping Projects To Reduce Stress, Headaches and Angry Mobs

Sign a contract & tell the client what to expect

Having all the expectations in writing is a great way to have both parties on the same page.
This will reduce the chance of having either party having some assumptions.
Also that way you protect yourself from Scope Creep which almost always shows its ugly head.

Block time to work on the project at least 3-5 hours each day

I noticed that when working on project I would stop and 2-3 days later resume working on.
Sometimes I would look at it in a week.
I was telling myself that I try to avoid being bored e.g. when I solve the hardest piece of the project in most of the time I’d loose some interest.
This turned out to be a very unproductive way to approach projects.
After some time I end up with partially done projects and if you’re goal oriented that consumes energy because those tasks are not finished.
David Allen (@gtdguy) calls these tasks open loops.

So go goal is to aim for any daily progress that way the task will stay fresh in your mind and you don’t have to put so much effort to try to remember where you left off.

Provide weekly update

Clients don’t need to wonder where you at with the project. You have to let them know.
I like to pick Thursdays/Fridays for a status updates because sometimes always comes up in the middle of the week. If you can do it twice a week that’s even better.

Nowadays, anybody can respond to emails quickly because we’re so connected. It is insulting to ignore a client for more than 24 hours. If you are super busy let them know that you will get back to them but don’t ignore them. Later or the next day answer their questions.

If it’s a complicated status update consider using a scree recording software such as Camtasia to walk the client through the update.

This is very important especially for programmers because the majority of the work is done under the surface. The client may see one button but he/she must know exactly how much work is happening behind that button.

Setup a test staging / site (on your own server)

Some clients will request that you work from their server so they can see progress.
Don’t do it.
Use your own servers. Hosting is so affordable nowadays (Linode, DigitalOcean, WP Engine), 1and1 – contact me for a quote if you need help with this).

The reason is that you know your hosting’s specs and have more control over.
That way you can have new software installed a lot quicker than having your client forward your requests to their hosting provider.

If you have to totally put your source code on client’s server consider encrypting/obfuscating it (e.g. using ioncube (they have an online version as well) or a different kind of obfuscator).
I admin that the obfuscation approach sounds very untrusting but I have about 10,000 ($) reasons to do it.

Note: if you need to setup a free test/staging WordPress site check (my product). It allows you to setup a test site in less than 2 seconds. It’s free to install plugins and themes from

Track your time

I have resisted this for a long time. Now, I log my gym time, email replies, calls, facebook, linkedin etc. I use toggl to track my time.
Almost everything you track & measure can be improved.
I primarily do it for myself so I can compare how long a task took vs the estimate.
This also helps me stay focused on one task otherwise it takes me some effort to go and pause the timer and enter a new task. I am able to catch myself within 0.5-2 minutes when I deviating from a given task.
This also helps when you estimate X number of hours and then the client requests more work even though sometimes the you’re over the estimated hours.
This also helps you track your actual hourly rate.
You may charge $X but when factor in little questions, meetings, research it adds up.

In conclusion nothing is perfect and sometimes we will forget one or more of these ideas.
I recommend after each project that you take some time to evaluate your decisions to see what you did right and what you should do differently in the future.

Did I miss anything? Please, share your ideas!


4 Things to Consider Before Creating a WordPress Plugin

So you were thinking of writing a WordPress plugin? Awesome!I am assuming that you’ve read how to create plugins and looked at the source code of some simple plugins. Great!

Here are a several things to consider before starting

  • What are you going to build & is there really a need for this kind of product? (tough one)
  • How should you name the plugin?
  • Support: Are you going to be maintaining the plugin in the future?
  • Business: What is the business model?

The questions above are very important to ask yourself before doing the work.We can create many products but if no one wants them that means that we haven’t used our time well. The good thing with programming is that whatever you create it’s not a total loss. The code can be recycled and reused in a different product.

What are you going to build & is there a need?

This is a very tough one because when we are about to create something we try to convince ourselves that this would be a cool product.In some cases that’s true but we have to be honest with ourselves and answer this question:Are we building this product because:We like the idea and the implementation excites us?
We’ve done (some) research which proved that there is a need for that product?There’s (almost) no right or wrong answer but the results will be different in each scenario.From my experience I can tell you that the products for which I’ve done some research have gotten a lot more downloads/sales. At the time of this writing I’ve created about 60 plugins (some are free, premium and the rest are done for clients).

Are there any other plugins that do similar things?

If yes, it might be a better option to become a contributor to another plugin rather than releasing it yourself.

Yes, won’t be *driving the bus* but you can learn a lot by contributing to another project. That also helps creating nice professional contacts.

How should you name the plugin?

If you’ve used WordPress for sometime you’ll be tempted to start the plugin name with WP or WordPress.I’ve done it. I admit it. As far as I know now using WordPress in the plugin name will most likely result in a rejection.Plugins are tested before they appear in the WordPress Plugin Directory.

After my 6th or 8th plugin I decided to put my company name in front of each plugin name. There’s huge benefit. People will start recognizing the name (eventually). Another huge benefit is that you can setup an alert at forums to be notified

when somebody mentions your plugin. All I had to do is to set an alert for “Orbisius” to get all of the notifications for most of my plugins.

Here is why it is important to name the plugin properly.Several years ago I chose a name that was trademarked. It was 2am and I didn’t think it through that much.That wasn’t the only issue. I named the plugin DigiShop and there is a shopping cart with that name. This was confusing people. My plugin was getting more and more popular and that caught the attention of the trademark holder who filed a DMCA take down team removed my plugin and then they notified me. This was too bad because the plugin had about 7,000 downloads.I was preparing to launch extensions for it. When WP team deletes your plugin there isn’t a way to push a release to the old users.I had to resubmit the plugin under a different name: Orbisius CyberStore.

Support. Are you going to be maintaining the plugin in the future?

Are you going to provide support?
If yes, where should your users seek support?

In the beginning email is fine BUT I highly recommend that, at some point, you switch to a publicly accessible support forum e.g. using bbPress or using WordPress’s plugin forums.

People will keep asking for the same questions over and over.

The reason that I suggest forum is that it is a scalable way to provide support.

If you track your time (I use toggle by the way. It’s great.) you know that writing a support email takes between 4-30 minutes. It also takes at least another 5-10 minutes to switch to a different task.

Your goal should be to not repeat yourself as much as possible.

When you switch to forums is going to be empty. This will cause people to still email you their questions. You may have to manually create the forum posts and create user accounts on behalf of the users.This, however, will make it easier for future users to post in it when they is some activity going on there.

In an addition to the forum you can have a nice and long FAQ page and/or articles that cover the top 20 questions that people might ask.

If you include videos or screencasts that will really help reduce your users help themselves and thus reducing the support requests.

The less time you have to provide support the more time you’ll have to focus on improving the product or marketing it.

What I am suggesting here is to make as much information available and accessible to as many people so you can dedicate more time to the most important things.

Some developers go the other extreme. That’s when they only provide paid support.

I am on the fence about this one because providing support has its benefits. You can listen to what your customers like, don’t like or want in your product.

That will influence the future of the product.

Of course that there are times that you should make an exception and allow your customers (paid or not) to contact me via email especially if they have to send me some sensitive information such as logins or links to their products.

Business Model

Everybody loves free software but development, support & marketing takes time and money. We have to value our time more than anything because we can never get it back.
Note: Donations ares NOT a viable business model!!!

If your plugin is going to be free you then must have a full/part time job that pays for your expenses.

Lots of people think that charging for a product is bad thing. That’s zero based thinking. They tell themselves “If I win somebody else has to loose”. Not at all.

If you believe that your product that can solve your clients problems then both sides gain value after the transaction. It’s not just one side that benefits.

It took me lots of time to feel OK for charging for my products.

In the beginning plugin sales can pay only for the hosting but over time it could grow and become a full time income if you do several things right (more on this in the future).

Another important reason is that you should (or must) have a business model is when you receive some income from your work that keeps you motivated to improve your product and release new ones.

There are lots of plugins in the WordPress plugin directory that don’t get updated. Why? Because their creators are busy doing work for other people to support themselves.

Those old plugins have good ideas but they will eventually become vulnerable because they are not maintained.

Note: if you happen to abandon a plugin put it on github and update the readme requesting a new maintainer. That way users will be aware that they are installing a plugin that won’t be updated.

Here are some ways how to make money with your WordPress plugin.

  • Pro version
  • Paid Extensions
  • Support – Free (Forum based) & Paid (Priority Email/Phone)
  • Links to “Hire Me” page so people can hire you to customize the product for their needs.



Do you have anything to add? Post a comment!

How to Fix XML Sitemap Not Found Error in WordPress SEO Plugin by Yoast

A few days ago I installed WordPress SEO by Yoast on and noticed that the sitemap.xml (which redirected to /sitemap_index.xml) wasn’t generated.

I checked the folder permissions and everything was fine. I am sure Yoast will fix that in a future version.

Some folks had to add some exceptions to their caching plugin. Since I am using WP Fastest Cache I didn’t have to do any of that.


All I had to do is

  1. Go to WP Admin > SEO > XML Sitemap
  2. Deactivate Sitemap by unchecking the checkbox under XML Sitemap
  3. Scroll down and click on Save Changes button
  4. Activate it by checking the checkbox again
  5. Scroll down and click on Save Changes button
How to Activate or Deactivate Sitemap XML in WordPress SEO by Yoast

How to Activate or Deactivate Sitemap XML in WordPress SEO by Yoast



Are You Thinking of Starting to Blog (Again)? Me too!

I’ve been thinking of (re)starting my blogging again for the last 2 months.
It’s time to finally and actually do it. I wrote my first articles back in 2006 and I remember how much I enjoyed sharing my knowledge (on and saving people time when troubleshooting programming issues.

For some reason I stopped working on my devcha (Developer Challenges) blog and I started working on a different (personal) blog on my domain. The next challenge was that I didn’t know which area to focus on. I wasn’t sure if I should make it a personal blog or a business one … I didn’t also want to name the company after myself. I made the mistake of taking too much time to think and lost my momentum.

There are many benefits of blogging.

  • You communicate better
  • You better and better at blogging / teaching
  • You put yourself in a position where you need to read regularly in order to blog smartly.
  • You create a nice reputation for yourself at a much more scalable way compared to talking to people 1 on 1.
  • Your site gets more traffic due to the fresh content
  • You get can known faster in the your area of expertise especially if you add audio or videos to deliver or enhance your message

I wrote this post to challenge myself to write at least one article per week and to keep doing this for as long as possible.

It’s really interesting how our environment can influence our behaviour. I am at a soccer field sitting on a bench and listening to the birds. This makes me write and write. I had to (re)move myself from my home office so I can try to see if that will get me unstuck from my blogging.

What is stopping you from blogging or other things you’ve been procrastinating on?
fear (of success, failure, being criticized, noisy place)?

I’d like finish with a quote form Jim Rohn

If you don’t like how things are, change it! You’re not a tree.