How to make phpBB forum read-only
PhpBB forum has an option to disable the forum. In that case no forums and topics are shown.
But what if we want to make the forum read-only. So that anyone can read it and nobody can change the date.
The solution is to give to the account, which phpBB uses to connect to the database, only SELECT permissions.
But that way you will get errors, because the application wants to write session data, etc. into the database.
So these permission changes must be executed for forum to be fully read-only.
Create new account ‘read_only’ and make phpBB use it for connecting to database in file ‘config.php’.
And then execute this code:
GRANT SELECT ON `phpbb_db`.* TO 'read_only'@'localhost'; GRANT INSERT, UPDATE, DELETE ON `phpbb_sessions` TO 'read_only'@'localhost'; GRANT INSERT, UPDATE, DELETE ON `phpbb_sessions_keys` TO 'read_only'@'localhost'; GRANT UPDATE (`config_value`) ON `phpbb_config` TO 'read_only'@'localhost'; GRANT UPDATE (`topic_views`, `topic_last_view_time`) ON `phpbb_topics` TO 'read_only'@'localhost'; GRANT UPDATE (`mark_time`) ON `phpbb_topics_track` TO 'read_only'@'localhost'; GRANT UPDATE (`download_count`) ON `phpbb_attachments` TO 'read_only'@'localhost'; -- Admin GRANT INSERT, DELETE ON `phpbb_login_attempts` TO 'read_only'@'localhost'; GRANT UPDATE ON `phpbb_users` TO 'read_only'@'localhost'; GRANT INSERT ON `phpbb_log` TO 'read_only'@'localhost'; -- Plugin: Advertisement Management GRANT UPDATE (`ad_views`, `ad_clicks`) ON `phpbb_ads` TO 'read_only'@'localhost'; -- Plugin: phpBB SEO GRANT UPDATE (`topic_url`) ON `phpbb_topics` TO 'read_only'@'localhost';