Today I had to spend a few hours tracking & fixing a WordPress Comments Are Closed Problem – unexpected too, it wasn’t me who changed the system. This was one of those pain-in-the-ass type issues as I didn’t realise that the comments had shut down until I noticed that the usual steady flow of notifications had not just taken a Christmas hiatus but had in fact evaporated. Comments are an important website feature, displaying a timeline of interaction, acting as a bridge between the lines of code & the real people who visit here.
If you’ve got the same issue, I’ve published my solution below to save time & frustration – just copy/paste & solve the WordPress Comments Are Closed Problem.
Upon inspection, I found the usual “Leave A Comment” form missing & the somewhat deathly announcement “Comments Are Closed” displayed under the existing comments. Neither of which I’d done, & I’m the only site admin here…
has just updated itself to version 5.3.2, which brings further movement away from the traditional rich HTML back-end editor & toward the newer HTML blocks style Gutenberg default editor. There’s also tighter integration for the Jetpack plugin that connects WordPress sites to the WordPress corporate mothership, where a more detailed traffic analysis is available in your Control Panel – amongst other options which almost fully duplicate the WordPress backend facility.
Also, for the first time ever, website comments now successfully link through to the WordPress corporate editor – it’s always been a problematic thing to pull your comments up via WP remote rather than logging in to the website real. This function has nothing to do with the WordPress Comments Are Closed Problem though.
After fighting the back-end controls repeatedly followed by deactivating, uninstalling & reinstalling my plugins to zero effect – a process that soaked up several hours – I came to the conclusion that this problem was not going to be sorted in the WordPress backend – the solution lay in the backend for the WordPress backend – it was time to put my SQL overalls on & get my hands dirty working under the bonnet.
uses a SQL database that controls all content here @ 1024kb.co.nz & every other WordPress website too. I solved the problem & re-opened the Comments section site-wide by using the phpMyAdmin plugin installed by default with Apache web server. Here’s how to solve the WordPress Comments Are Closed Problem using phpMyAdmin.
I’m wasn’t certain, but I did strongly suspect that since the Pages/Posts Properties column in WP 5.3.2 is now more detailed, offering granular option selection – including allowing comments on a per-page basis – that this change had the nasty & I’m sure, unintended side-effect of killing user interaction on WordPress websites.
My mission was Search & Destroy, not Research & Build A Cure, so exactly why this issue happened can remain a mystery, it’s fixed now.
See those 2 tiny little switches with minuscule green indicators? Those are the new granular Comments selectors. Helpfully, they work in reverse to all other software switches. Slide the tiny switch left to turn it on. *sigh*
Having found these unwanted invaders, you’d expect I could just flick the switches, Apply, Save & walk away, yeah?
Not even. Well, I could but then I’d need to turn around & get back to work because the problem was still not solved – stupid little switches did nothing. FFS.
The next step with any WordPress problem is to disable your plugins one by one, checking each time. Nope, didn’t work. The process took ages, but didn’t work. So much for standard operating procedure. I re-enabled the plugins & decided that the solution lay beyond the WordPress backend – in the backend for the backend, using phpMyAdmin to manipulate the SQL database that WordPress sites run on. It was time to put my overalls on & get my hands dirty.
Playing with SQL commands is a dangerous game – this is the core of your website. Make sure you backup your SQL file first, then make sure your backed-up SQL file is valid.
It’s easy to restore a database backup but almost impossible to recover dropped tables / wiped records if your SQL commands go haywire. Backup, backup, backup. If you can’t backup, then back off.
Log in to cPanel, open phpMyAdmin. Select your database, check the table prefix that WordPress allocates per-database – you’ll need to use this detail to alter the SQL commands I’ve prepared. There’s 3 commands to be executed sequentially.
OK, click the SQL Commands tab, in the Input field, paste this:
UPDATE wp_posts SET comment_status = REPLACE (comment_status, 'closed', 'open') WHERE post_status = 'publish' AND post_type = 'post';
NB: replace the wp of wp_posts with your database prefix – so it reads like this: a1b2c3_posts.
Read the SQL Command to understand what you’re doing – updating all records in wp_posts where Comment_Status is Closed & Post_Status is Published to Coment_Status is Open. Simple really.
Click Go. You’re done. Finished.
If you want to open your Pingback status, copy/paste the next command, altering the wp_posts title as above.
UPDATE wp_posts p SET comment_status = 'open', ping_status = 'open' WHERE comment_status = 'open';
Click Go. Right, that’s done
Check your website, 1024kb.co.nz comments were open again, thanks to the magic of phpMyAdmin & SQL commands. Plus some luck too.
I could now allocate my WordPress Comments Are Closed Problem as [SOLVED]
(If you should want to close your comments, use this SQL command, again you’ll need to change wp_posts to your unique table name.)
UPDATE wp_posts p SET comment_status = 'closed', ping_status = 'closed' WHERE comment_status = 'open';