How do I disable all comments on my WordPress site?

Comments on new posts can be disabled under Settings/Discussion in the admin interface. Unclick “Allow people to post comments on new articles “. This, however, will not disable comments on any posts that already exist. For those, you can issue this line of SQL: mysql> UPDATE wp_posts p SET comment_status = ‘closed’, ping_status = ‘closed’ …

Continue reading ‘How do I disable all comments on my WordPress site?’ »

Why am I seeing “Call to undefined function get_header() in index.php on line 1”?

Problem: Why am I seeing “PHP Fatal error:¬† Call to undefined function get_header() in /sites/xxxxx.com/htdocs/wp-content/themes/[THEME NAME]/index.php on line 1” in my Apache error logs?   Explanation: Some WordPress themes have an error in their header.php file that calls upon the main theme directory as the URL to load a stylesheet. Look for a line like …

Continue reading ‘Why am I seeing “Call to undefined function get_header() in index.php on line 1”?’ »

Why doesn’t WP-CLI work?

Why doesn’t WP-CLI work? You installed WP-CLI, per the instructions, but when you run it from the command-line, nothing happens: root@www:/var/www/wordpress# php wp-cli.phar root@www:/var/www/wordpress# …and you see, in /var/log/syslog: Jan 10 21:36:14 www suhosin[16064]: ALERT – Include filename (‘phar://wp-cli.phar/php/boot-phar.php’) is an URL that is not allowed (attacker ‘REMOTE_ADDR not set’, file ‘/var/www/wordpress/wp-cli.phar’, line 4) Solution …

Continue reading ‘Why doesn’t WP-CLI work?’ »

Why is WordPress saying “Database Update Required” when I try to login?

If WordPress gets confused about it’s database, such as when you install a WP update, then revert, you may find yourself unable to login without agreeing to perform a database update. One reason this can happen is that your “db_version” string got updated in the database by the code upgrade. ¬†Each version of WordPress has …

Continue reading ‘Why is WordPress saying “Database Update Required” when I try to login?’ »