Disable WordPress comments based on User GeoLocation - Disable WordPress comments based on User GeoLocation

Disable WordPress comments based on User GeoLocation

If you want to disable comments in WordPress based on the user’s location, you can do so by using the following steps: Step 1. Install and activate the “GeoIP Detection” plugin. This plugin allows you to detect the user’s location based on their IP address. Step 2. Add the following code to your theme’s functions.php … Read full article →

List of all WordPress Constants UPDATED - List of all WordPress Constants (UPDATED)

List of all WordPress Constants (UPDATED)

WordPress.org has a list that explains the default and most commonly used wp-config.php constants. But there are many more constants that are not covered in this guide and can only be found when browsing the WordPress core itself. Here I will do my best to list all WordPress constants, and keep the list up to … Read full article →

Delete unused images in WordPress using WP CLI - Delete unused images in WordPress using WP CLI

Delete unused images in WordPress using WP CLI

This small script uses a for loop to delete one post ID at a time, it will go through the database and list all media files uploaded in the provided data range that are not used inside posts. Change the date range according to your needs.

How to remove meta generator tag from WordPress - How to remove meta generator tag from WordPress

How to remove meta generator tag from WordPress

WordPress has an HTML meta generation tag that shows that your website is running WordPress and which version exactly. If you right-click on this page and choose View Source, you can find this tag by searching for “generator” in the source code. You should see something similar to: <meta name=”generator” content=”WordPress 6.0.3″ /> This code … Read full article →

yoastseophp81 - Yoast SEO is (kind of) incompatible with PHP8

Yoast SEO is (kind of) incompatible with PHP8

Yoast SEO is compatible with PHP 8 and PHP 8.1 but the Composer that YoastSEO is using doesn’t yes support PHP 8.0 so you might experience problems when editing posts&pages in WordPress. According to this comment there are still 19 other PHP version incompatibilities remaining to be fixed. 😲 So turns out that YoastSEO is … Read full article →

How to Identify if My WordPress Website is Hacked - How to Identify if My WordPress Website is Hacked?

How to Identify if My WordPress Website is Hacked?

This is one of the most-asked questions that I get emailed from people that read some posts from my Types of WordPress Malware Attacks and What They Do series. 99% of the time website owners are the last ones to find out that their WordPress websites are hacked, after visitors, Google, website scanners, and their … Read full article →

wp xml to markdown - Convert WordPress to Markdown

Convert WordPress to Markdown

Export WordPress posts to XML an then convert it into Markdown files suitable for a static site generator such as Gridsome, Gatsby, Hugo, Jekyll, etc. Step 1. Export WordPress to XML Navigate to Tools > Export and Select “All Content” File will be saved as [website].WordPress. [DATE].xml Step 3. Install NodeJS & Git Make sure … Read full article →

Uncaught Error Call to undefined function wp in wp blog header.php16 - Uncaught Error: Call to undefined function wp() in wp-blog-header.php:16

Uncaught Error: Call to undefined function wp() in wp-blog-header.php:16

[20-Feb-2023 11:21:11 Europe/Belgrade] PHP Fatal error: Uncaught Error: Call to undefined function wp() in /home/user/example.com/wp-blog-header.php:16 Stack trace: #0 /home/user/example.com/index.php(17): require() #1 {main} thrown in /home/user/example.com/wp-blog-header.php on line 16 You may notice this error Uncaught Error: Call to undefined function wp() in wp-blog-header.php:16 on your error_log file if: wp() is a WordPress core function that calls … Read full article →

wordpress mysql usage statistics - WordPress MySQL Version Usage Statistics UPDATED

WordPress MySQL Version Usage Statistics UPDATED

As of 2021, the vast majority of WordPress websites are using MySQL version 5.6 or higher because WordPress has required at least MySQL version 5.6 since version 4.4, released in 2015. Newer MySQL versions are not yet widely adopted, as some users may be using older hosting environments that do not support them, or they … Read full article →