Automatically add meta description tag to Mediawiki pages

Latest version of Mediawiki does not have any in built support for description meta tags. However they are very much essential for SEO. One of the another advantage having meta description tag is when sharing wiki articles in Facebook and similar services as they will use text in the meta description tag for the link preview.

Description2 is a very good extension which will dynamically create meta description tag according to the page content. There are no needs of any changes in the Mediaiwki core or database.

All you have to do is:
  1. Download and extract Decription2 extension on to the extensions/ directory.
  2. Add the following lines to LocalSettings.php
    • require_once( "$IP/extensions/Description2/Description2.php" );
    • $wgEnableMetaDescriptionFunctions = true;
That's it. You can now see meta description tags in Mediawiki pages.


Popular posts from this blog

How to rip Audio CD with VLC