View Categories

PHP 8.1 / 8.2 Warnings After Upgrade

Problem Description #

After upgrading to PHP 8.1 or 8.2 the admin shows deprecation warnings or notices that reference plugin files, or the plugin logs warnings in debug.log.

Common symptoms:

  • Notices or warnings like “Deprecated: Creation of dynamic property … is deprecated” or other PHP 8.x notices referencing Slugs Manager plugin files.

  • Warnings show in wp-admin or appear in wp-content/debug.log.

Cause:
PHP 8 introduced deprecation for certain behaviors (e.g., dynamic properties). Older plugin code sometimes triggers these notices. Plugin authors often release updates to remove deprecated constructs. The plugin’s support list includes PHP 8.2 warnings reported and handled in the forum. WordPress.org

Solution – step-by-step #

  1. Update plugin first

    1. Go to Plugins → Installed Plugins and update Slugs Manager to the latest version. The vendor frequently issues fixes for PHP deprecations.

  2. Suppress display of deprecation notices on production (temporary)

In wp-config.php ensure error display is disabled:

define( ‘WP_DEBUG’, true );

define( ‘WP_DEBUG_DISPLAY’, false );

define( ‘WP_DEBUG_LOG’, true );

@ini_set( ‘display_errors’, 0 );

  1.  This prevents notices from showing to visitors while still logging them to wp-content/debug.log for debugging.

  1. Test on staging with PHP 8.x

    1. If you manage your PHP upgrade, test plugin behavior on a staging server using PHP 8.x first. Report any persistent issues to plugin support with sample warnings from debug.log.

  2. If warnings persist after update, provide debug info to support

    1. Include WordPress version, plugin version, PHP version, and a snippet of the exact warning. The author can apply a code fix if required.

Prerequisites #

  • Access to plugin updates and wp-config.php editing.

  • Staging environment recommended.

Additional Notes / Prevention #

  • Keep plugins updated prior to PHP upgrades; consult plugin changelogs for PHP compatibility notes.

Use WP_DEBUG_LOG to collect warnings without exposing them to users.

 

Slugs Manager: Delete Old Permalinks from WordPress Database