Often when a WordPress site is compromised, the website owner doesn’t notice anything strange at first. First a lot of users are created, and it’s only later when posts filled with spam are created or existing pages/posts edited. In the time between compromise and creation of spam posts, a website owner might notice an increased number of users. If he has the means to. And that’s what this little plugin does.
PHP Tag Archive
Delete spam comments after three (3) days
Here is how to change the Akismet interval to three days instead of 15 days for deleting spam comments using the akismet_delete_comment_interval filter
Fatal error: Uncaught Error:  operator not supported for strings – PHP 7.1
With PHP 7.1, some PHP web applications fail because of deprecated code usage. This may result in an error message like  operator not supported for strings for various Joomla, WordPress and Drupal components. Here’s how to fix this code for PHP 7.1+.
Increase WordPress’ memory limit WP_MEMORY_LIMIT properly in wp-config.php
How to increase the memory limit for your WordPress website, the right way. The WordPress memory limit can be increased by the WP_MEMORY_LIMIT variable in wp-config.php. However, I see this done wrong over and over again in WordPress plugins and themes. In a worst case scenario this may even decrease the available amount of memory for WordPress! So be careful with the advice you follow. In this post I show you a correct way of setting WordPress WP_MEMORY_LIMIT and PHP memory_limit settings.
Remove Jetpack email sharing service
Recently the WordPress Jetpack email sharing service is often abused by spammers. They use the Send to Email Address for sending spam. All these kind of “Tell a Friend” scripts are abused a lot. Here is how to disable email share service in Jetpack.
How to make Twenty Seventeen theme full width in WordPress
The default WordPress theme Twenty Seventeen’s content width can be easily changed to full width. All you need is this bit of CSS:How to make Twenty Seventeen theme full width in WordPress
Check WordPress Core files integrity
Learn the importance of checking and verifying WordPress Core files md5 checksums against WordPress’ checksums API, using this standalone PHP file. WordPress integrity matters and therefore I chose to use a standalone PHP script to check the md5sum of WordPress Core files against the API. Doing os makes you’re not dependent on a possibly hacked WordPress installation. This kind of guarantees the result can be trusted, as opposed to using a WordPress plugin. I think this is a better integrity check of WordPress Core files.
Clear PHP opcode caches before WordPress Updates: ease the updating process
In various hosting environments, WordPress core-, plugin- and theme updates sometimes fail because of enabled opcode caches. Popular PHP opcode caches are OPcache, WinCache and APC. This little WordPress Must Use Plugin tries to flush opcode caches. Making your live a bit easier when updating WordPress Core, Plugins and Themes.
The WinCache effect: Save with object caching
WinCache, or Windows Cache Extension for PHP, is a PHP accelerator that is used to significantly increase the speed of PHP applications running on Windows Server IIS. Besides increasing the speed of PHP applications, WinCache decreases CPU usage making it a win win situation extension.
Benchmarking WordPress, simple load & speed testing with ApacheBench
Here is how to load test WordPress with ApacheBench. ab is a small benchmark utility that comes with Apache. It’s a really simple HTTP load generating tool, ideal for a simple WordPress load & speed test. How fast does your WordPress site respond? How many HTTP requests per second can your server handle? These are questions on which ab can shed some light.
Measure WordPress loading time and queries
How to measure WordPress’ loading time and executed database queries? During an HTTP request, WordPress executes a lot of queries on your MySQL database. Not just the database queries take time, also loading and executing PHP takes time.
How to optimize your WordPress hosting – 9+ practical tips
9+ Practical tips to optimize WordPress hosting, or any other PHP web application for that matter. Discover how this very blog has optimized its WordPress hosting environment and how you can too by optimizing MySQL, PHP and server configuration.
“How we broke PHP, hacked Pornhub and earned $20,000”
This is a very interesting read on how Dario Weißer (@haxonaut), cutz and Ruslan Habalov (@evonide) were able to find a PHP unserialize bug to exploit and gain remote code execution on Pornhub. Pornhub’s bug bounty program is at Hackerone. Instead of actively attacking Pornhub, they took another road and attacked what Pornhub is built upon: PHP.
Binary webshell through OPcache in PHP 7
GoSecure wrote up a new PHP exploitation technique using the default OPcache engine from PHP 7. Using this attack vector, it’s possible to bypass certain hardening techniques that disallow the file write access in the web directory.
How to install Microsoft’s SQL Server Driver for PHP
In this article I’ll show you how to install the Microsoft SQL Server Driver for PHP 7+. This makes the use of an SQL Server database back-end for your PHP website easy. This post walks you through the steps necessary to install the SQL Server driver and SQLSRV extension for PHP 7+, on Windows Server IIS of course.