Cloudflare WordPress Plugin is the easiest way of setting up the Cloudflare CDN features for your WordPress websites or blogs. With the help of this plugin you can automatically purge the cache files, check the analytics and some additional features of CDN directly from the admin settings page. In the last release of their plugin version 3.1.1 they have moved Admin Bar behind Automatic Cache Purge toggle. This is causing some inconvenience to the users as they cannot see the admin bar once they visit the website pages.
If you have enabled the Jet pack statistics on admin bar, you also cannot use the feature anymore, as the Cloudflare plugin blocking the admin bar, so you can’t view the last 48 hours visitors statistics.
Here are the simple steps to get back the admin bar :
It is possible and very easy to hide or show the admin bar, just follow the below steps one by one..
STEP 1:
Login to your cPanel and locate the file Hooks.php or alternatively you can trace the below path
/home/<cpanel-path>public_html/wp-content/plugins/cloudflare/src/WordPress/Hooks.php
STEP 2:
Now right click on Hooks.php and select Code edit and got to the editor and find the below lines of code for admin bar.
STEP 3
Comment the two lines as below and save the changes and close the editor.
Now you will be able to see your admin bar back on your WordPress website. We have tested this also in WordPress Multisite Network and its worked fine..
NOTE: Commenting out the above lines may not work for all and can conflict with other plugins installed in your WordPress site.
Are you kidding? This hack will show admin bar to anonymous users if page is cached while user was logged in as admin.
Very dangerous maybe … !
Official Cloudflare plugin so many bugs. Use other is safer/faster: https://wordpress.org/plugins/cf-littlebizzy/