• Resolved electrobaziani

    (@electrobaziani)


    Subject: PHP Default Timezone Changed After WordPress Load (Site Health Warning)

    Hello Rank Math Team,

    I’m experiencing a WordPress Site Health warning that only appears when Rank Math SEO is active. Environment

    • WordPress: 7.0.2
    • Rank Math: 1.0.274.1 (Free)
    • PHP: 8.4.22 (64-bit)
    • Hosting: Linux + cPanel
    • WordPress Timezone: Asia/Tehran

    Site Health Warning

    PHP default timezone is invalid.

    The PHP default timezone was changed after WordPress loaded by a call to date_default_timezone_set(). This interferes with correct date and time calculations.

    Troubleshooting already performed

    I have already completed the following tests:

    • Deactivating Rank Math immediately removes the Site Health warning.
    • Activating Rank Math causes the warning to appear again.
    • Completely removed Rank Math.
    • Deleted the remaining plugin directory from wp-content/plugins.
    • Installed a fresh copy from the official WordPress.org repository.
    • The warning appears immediately after activation, before running the Setup Wizard.
    • Exported and restored Rank Math settings, but the warning remained.
    • The mu-plugins directory is empty.
    • Searching the plugin files for date_default_timezone_set() returns no results.
    • WordPress timezone is correctly set to Asia/Tehran.
    • PHP timezone on the server is correctly configured according to my hosting provider.
    • No custom code related to timezone has been added to wp-config.php or the theme.

    Conclusion

    Since:

    • the issue disappears immediately when Rank Math is deactivated,
    • and it returns after installing a completely fresh copy from the official repository,

    it seems that either Rank Math itself, or one of the libraries loaded by Rank Math, is changing the PHP default timezone during WordPress execution.

    Could you please investigate this behavior?

    If you need additional logs, Site Health information, or any debugging data, I’ll be happy to provide it.

    Thank you very much.

    If needed, I can also provide Site Health Info and a list of active plugins.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.