Skip to content

Instantly share code, notes, and snippets.

@pH-7
Last active February 25, 2019 06:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pH-7/ccfed2fba5761ebc43882ce24a5f4e90 to your computer and use it in GitHub Desktop.
Save pH-7/ccfed2fba5761ebc43882ce24a5f4e90 to your computer and use it in GitHub Desktop.
Reset the pH7CMS, admin panel's IP restriction. Sometimes, your public IP changed, or your website is hosted on a localhost, and you cannot log in anymore to your admin panel. By executing this query through your phpMyAdmin or MySQL command line, you will clear the IP you previously set, and you will again be able to log in to your admin dashboa…
--
-- Author: Pierre-Henry Soria <hi@ph7.me>
-- Website: https://ph7cms.com
-- Copyright: (c) 2011-2019, Pierre-Henry Soria. All Rights Reserved.
-- License: GNU General Public License
--
---
-- Reset the pH7CMS, admin panel's IP restriction.
-- Sometimes, you cannot log in anymore to your admin panel, because your public IP changed, or your website is hosted on a localhost and cannot work with.
-- By executing this SQL query through your phpMyAdmin or MySQL command line, you will clear the IP value you previously set,
-- and you will again be able to log in to your admin dashboard with any IP addresses.
---
--- Replace the "pH7_" by your database prefix set in ~/_protected/app/configs/config.ini -> [database] prefix
UPDATE pH7_Settings SET settingValue = '' WHERE settingName = 'ipLogin';
@pH-7
Copy link
Author

pH-7 commented Feb 1, 2019

The last thing you will have to do is to delete all files located in /_protected/data/cache/pH7_cache/db/config/
You can do that easily with an FTP client (FileZilla) or through your cPanel dashboard.

The reason is that the value will still be cached in a static file. Indeed, to speed up your website and reduce CPU resource, pH7CMS caches most of the data from the database to static files in your web server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment