Blocking Everyone from Accessing WordPress Login Page

This will block everyone (including yourself) from accessing your WordPress login page:


RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteRule ^(.*)$ - [R=403,L]

This goes to .htaccess file that is located in the root folder of your site. It’s possible to exclude yourself by adding your IP address, but for sites I never touch I prefer it this way.

How to Disable Plugin and Theme Updates and Installation

Due to installing a faulty plugin to one of my sites, I had an experience of being hacked — twice. What I noticed is that every time hackers got access to my site, they tried to install a new plugin. Because I already disable file editing in my WordPress dashboard, these new plugins they install are probably meant to be used as backdoors in the future.

So I found this quick way to disable future installs of plugins and themes (by wpmudev). To your wp-config file simply add

/**Disable plugin and theme updates*/

Unfortunately this prevents even your own updates and installs as well. Once the line is added to your wp-config file, you will simply stop receiving new updates notifications.

In the future, I will probably need another solution, but for now this is good enough for my compromised site that keeps getting hacked. I will settle for this code until I figure out how to close the backdoor.

Results of My Google Analytics Outbound Link Tracking Experiment

Two weeks ago I set up affiliate link tracking in my Google Analytics. Although the program doesn’t pay much per sale, it does convert pretty well given my generic traffic. They do offer detailed stats but I suspected that it reports too many clicks (including bot clicks) and I always wanted to track this via Google Analytics. Not just for the sake of fun, I hoped that maybe I will get some insights that will help me make more sales. Two weeks later, I hope I have a large enough sample to analyze.

First, initially I estimated that I earn in average $0.08 per click on my affiliate links. I wanted to see if that would be correct when tracked more closely with GA.

Well, the answer is more like $0.062 per click so far but past two weeks weren’t brilliant. I guess it could change if I keep testing for longer.

Second, having sent unique 1350 clicks in two weeks (according to GA and 1580 according to vendor’s reports), I can see what people tend to click the most. A lot of it is because of the way the titles are written, and then there is something I didn’t expect them to click all that much, but they do!

Third, although people are clicking, they still tend to buy one and the same thing. There is not much variety in what they buy. To make things worse, the buyers could be actually targeted traffic from Google that land on a relevant article that also has an affiliate link, which I am not tracking.

The experiment is messed up by the simple fact that most people will not buy from the first click. They will take some time to browse the vendor’s site and then buy or even come back next day. Once they click on second page on the vendor’s site, my unique tracking code that tells me what link they clicked to get there is gone. Yes, I do get commission, but I can’t make any valuable conclusions from my statistics data.

So once again: there are things they click and there are things they buy, and the two are not necessarily the same thing. I probably should remove all links that they click but don’t buy. This way I will stop sending the vendor tons of free traffic that rarely converts and keep it to myself. I will send less traffic, but my earnings per click will hopefully go up. Something to think about.

Fourth, I now have remarketing lists for people who clicked the links and for people who visited relevant pages that were more likely to convert. I could blend the two and target them with Google Adwords and maybe earn more than $0.06-$0.08 per click because they are supposed to be highly targeted.

Fifth, all the missing pieces of this puzzle could be tracked with Google Analytics if I owned the product myself and had the ability to place the code on the product site. It’s not the fault of GA, it’s my limiting situation. For those who have their own products to sell and don’t use GA to track the conversion flow, who don’t set up goals and events — you have no idea what you are missing!

Sixth, it costs me $45 to receive the bank transfer payment. Minimum payout is $250. I probably should ask them to increase the minimum payout for me so that I don’t pay $45 on every $300-$350.

Not many good conclusions, but it was fun anyway. I will keep this for longer until I know what to do with this. I am all to busy with other things now.