How To Hide MediaWiki Sidebar From Visitors?

You can suppress the display of the sidebar from anonymous and un-logged-in users on your MediaWiki website. This can be done by creating a new PHP file in extensions folder then including the code in LocalSettings.php file.

Login to your MediaWiki website’s file manager or FTP, navigate to /extensions directory located in your site’s root and create a new folder /HideSidebar.

Open the folder, create a new PHP file with name HideSidebar.php and paste the following code: