Disable Emoji for WordPress

Today I’ve read some article at PostStatus about the Trojan Horse Emoji and I’m still wondering why the Emoji feature becomes a part of the WordPress core. There are so many important features which could improve WordPress, but we got something no one likes :( … Wait, I disabled Emoji for this website and I’m still seeing this new Frownie image???

Video: Anatomy of a Critical Security Bug

Watch this Youtube video where Andrew Nacin talks about the critical security vulnerability and how it was discovered and patched in WordPress 4.2.

After the update to WP 4.2, the first thing I have noticed was a long JS/CSS snippet inside the HEAD of my website. Something I don’t like for a feature I didn’t asked for. The old smiley replacement function has got some new images and that is enough for me. So I decided to disable Emoji for this and many other websites I manage. Continue reading Disable Emoji for WordPress

Store your Twitter API results with Memcache

Recently I needed a dynamic cache function for some PHP based, custom website. Most pages are a kind of mash-up with different results and one of them was dynamic Twitter feed that shows the latest tweets for some static “search” value.

Using the PHP library Twitter OAuth by Abraham is it very easy to create a Twitter search or any other Twitter API request. The only preparation you need to do is, create an app in the Twitter developer section. Continue reading Store your Twitter API results with Memcache

Limit brute force attacks for WordPress websites

On of the biggest issues for WordPress attacks are brute force attacks. Even a smaller website might slow down your server if a bot is trying to hack your website or is sniffing for vulnerable files or locations.

By default each page request to a WordPress website will produce several database queries. Also page requests for non-existing pages and files! Continue reading Limit brute force attacks for WordPress websites

Prevent posting of long strings

You know the problem from weblog’s, forums and guestbook’s: Extra long strings with more than “x” same characters in order. The result is an element width which will distort your website. This function takes care of this kind of string (for example multiple chars or explanation marks). The formatted string is be shortened to the amount of characters you specify. Continue reading Prevent posting of long strings

Keep your SSH sessions alive

Most Internet service provider will try shutdown active Internet connections after a view minutes to prevent their network from streaming videos or other bandwidth killers. This happens often because of some router setting you can’t change. As a web developer your SSH session (and other active connections) will freeze, if you stop working in the terminal window for just 5 minutes or by getting a fresh cop of coffee.

To get rid of this problem you need to change your SSH config file, enter the following inside to the terminalwindow

sudo nano /etc/ssh/ssh_config

and add this setting to the end of the file

ServerAliveInterval 60

Safe your file and start a new SSH session which will stay active because the client sends every 60 seconds a bit of data to the server.
Check also this article for more information.