Category Archives: Web Development

PHP function to get WordPress plugin version

Wordpress Logo BlueSo you're working on a WordPress plugin and you want to get current plugin version using PHP for display inside your plugin settings or on your plugin front end. Hardcoding the plugin version and changing it every release is no fun so in this article I'm bringing you my little PHP function I use with my Quick Chat for WordPress plugin to get current plugin version.

As always with WordPress development you need to be extra careful with your PHP and Javascript function names so you should prefix your every function with your plugin name. So here is PHP function you can use inside your plugin PHP file to get plugin version:

function plugin_name_get_version() {
    $plugin_data = get_plugin_data( __FILE__ );
    $plugin_version = $plugin_data['Version'];
    return $plugin_version;

Keep in mind that get_plugin_data() is available only on site backend. I guess it needs no additional explanation. Enjoy!

Configure MySQL and Apache not to start at boot on Ubuntu Linux

MySQL logoI often do my web development on the move using my laptop. Because of that I must run Apache with PHP and MySQL servers on both my desktop and my laptop PC. You can probably guess that this doesn't help to conserve my laptop battery so I've configured my laptop not to start MySQL and Apache automatically at boot. Instead I start those services manually when I plan to do some coding. In this article I'll show you how to configure your Ubuntu based PC to do the same.

Continue reading

Change WordPress RSS Widget refresh interval

AskUbuntu LogoYesterday I've added AskUbuntu RSS Feed to sidebar to display feed of Ubuntu related questions with links to answers all provided by the Ubuntu community. This is really useful service. I've used WordPress RSS widget to display this RSS feed. The problem I've ran into was that WordPress RSS widget feed was refreshing only once in every 12 hours and for my purpose this is not often enough. In this article I will show you how to change WordPress RSS widget refresh interval.

Continue reading

Configure MySQL to keep log of all queries on Ubuntu Linux

MySQL logoIn this article I will show you how to enable keeping general log of all SQL queries for MySQL DBMS on Ubuntu based operating systems. I find this very useful when debugging Ajax powered applications like my Quick Chat for WordPress. This way it is also easier to understand how application works by monitoring SQL queries it uses. So lets get started...

Continue reading