Server Software and Configuration Services
Running cPanel v76? Want a link to Plugins on the Home Page?
cPanel decided to provide a cut-down home page for WHM for v76+. It makes finding plugins (such as csf) a pain. Here is a simple way to add a Plugins link to the new homepage:
Some caveats:
- DO THIS AT YOUR OWN RISK! Neither we nor cPanel will likely help if it goes horribly wrong!
- The change will be overwritten when the next version of cPanel is released or if you run:
/scripts/upcp --force
- It might break your WHM home page
- It might not work in the future
OK, so here’s what to do:
- SSH into your server as root (or use the Terminal app from WHM!)
- Create a file called /usr/src/main.tmpl.patch
- Add the following to that file as-is:
213a214,225 > [% IF (Whostmgr.check_flag('addons')) -%] > [% varcache.set('locale_str',locale.makevar("Plugins")) %] > <li class="application"> > <a href="[% cp_security_token %]/scripts/command?PFILE=Plugins"> > <img class="mr-10" src="[% Whostmgr.get_icon_url('icons/plugins.png') %]" alt="[% varcache.locale_str -%]" aria-hidden="true"> > <div class="application-details"> > <div class="application-title">[% varcache.locale_str %]</div> > <span class="application-description">[% varcache.locale_str %]</span> > </div> > </a> > </li> > [% END %]
- Run the following command:
patch -bp0 /usr/local/cpanel/whostmgr/docroot/templates/menu/main.tmpl /usr/src/main.tmpl.patch
- That should be it
To restore the page back, either:
- Restore the backup created by the patch command:
cp /usr/local/cpanel/whostmgr/docroot/templates/menu/main.tmpl.orig /usr/local/cpanel/whostmgr/docroot/templates/menu/main.tmpl
or:
- Run upcp:
/scripts/upcp --force
Once again, you do this at your own risk. Have fun!