Category: Miscellaneous

  • 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: [crayon-6337d6bf0a98c155751196/]

  • 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 […]

  • MySQL server has gone away (error #2006)

    I had to migrate a web site from one server to another, having phpMyAdmin as the db administration tool and the db dump from the old server. Problems I faced were trivial, yet I wasted plenty of time on fixing them. File is bigger than the limit for uploaded files. – Thats easy, if you […]

  • “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, […]

  • Another git cheatsheet

    Resources on WordPress Another git cheatsheet

    An extensive git cheatsheet. Neat.

  • Checking your mobile data usage (Mtel only)

    TL; DR – If you have a mobile data plan from Mtel (USB modem or integrated one) and you use Linux, you can’t really check your data usage because the software Mtel provides is Windows-only. You can always use a watchdog of some sort that monitors the traffic on the client side but that’s not really […]