Unable to upload files: “File is empty”

Out of nowhere I couldn’t upload files, getting the following message after the upload process completes: File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini Furthermore, I couldn’t see any of the […]

Redirecting logged in user from wp-login.php to home page

Just drop this in your functions.php:

Adding a button to TinyMCE – the Visual Editor in WordPress

I needed a simple button that would generate a shortcode on clicking. And that button had to be in the visual editor when adding or editing posts. That editor is implemented by TinyMCE, which is an opensource project too. Well, anyway, I wasted several hours fighting with existing plugins and themes that have introduced some […]

“Language is already enabled or invalid!” when enabling new language to qTranslate

The error from the title pops-up when you enable a language you added a minute ago to the configuration (from the Settings -> Languages page). Usual case is you deal with an old database, that has collations, different from utf-8, and that messes up things. qTranslate FAQ will suggest you use a plugin called UTF Database Converter, […]