Skip to content
Skip to main content
Ahosting Logo
  • Hosting
    • WordPress Hosting
      Fast, secure hosting for WordPress sites
    • Web Hosting
      Reliable, affordable hosting for sites
    • FFMpeg Hosting
      Fast hosting for FFmpeg projects
    • Reseller Hosting
      Start hosting biz with white-label plans
    • VPS Hosting
      Scalable VPS with full control & power
    • Dedicated Server
      High-power servers for max security
    • WooCommerce Hosting
      Fast hosting for WooCommerce shops
  • Domain
    • Register a Domain
      Secure your domain name in minutes
    • Domain Transfer
      Move domains to Ahosting with ease
    • Premium SSL Certificate
      Enterprise SSL to build customer trust
  • Support
    • Submit A Ticket
      Expert 24/7 help from our support team
    • Abuse Report
      Report abuse to keep network safe
    • Knowledge Base
      Quick answers via step-by-step guides
  • Company
    • Blog
      Expert articles to power your online growth
    • Compare Hosts
      Side-by-side comparison
    • Datacenter
      Secure, high tech datacenter for hosting
    • About Us
      Learn about our mission, values & team
    • Contact Us
      Contact sales for plans, pricing & advice
    • Sitemap
      Find info fast with our clear site map
My Account
Ahosting Logo
  • Hosting
    • Web Hosting
    • WordPress Hosting
    • FFMpeg Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Server
    • WooCommerce Hosting
  • Domain
    • Register a Domain
    • Domain Transfer
    • Premium SSL Certificate
  • Support
    • Knowledge Base
    • Abuse Report
    • Submit A Ticket
  • Company
    • About Us
    • Contact Us
    • Blog
    • Sitemap
    • Datacenter
  • Legal
    • Privacy Policy
    • Terms of Service
    • Acceptable Use Policy
    • Service Level Agreement
    • Resource Abuse Policy
My Account

AHosting Blog

Author: Matt Chrust

Matt Chrust

Director of Business Development, AHosting Matt has led business development at AHosting since the company’s founding in 2002. He writes about WordPress hosting infrastructure, server performance, and the evolving requirements of WordPress sites at scale.
  • Cannot Use Object of Type WP_Error as Array in WordPress: Find the Failure and Fix It (2026)

    Cannot Use Object of Type WP_Error as Array in WordPress: Find the Failure and Fix It (2026)

    • Cannot Use Object of Type WP_Error as Array: What the Fatal Error Means
    • Why a WordPress Function Returns a WP_Error Instead of an Array
    • What We Reproduced Behind the WP_Error as Array Fatal
    • How to Find the Plugin or Theme Behind the Fatal
    • How to Fix WP_Error as Array in Code You Control
      • Check First, Then Index
      • Why isset() Does Not Stop the WP_Error as Array Fatal
    • Decode the WP_Error Behind Your Fatal Error
    • What to Do When WP_Error as Array Comes From Code You Did Not Write
    • Frequently Asked Questions: WP_Error as Array Fatal Error
      • How do I fix the Cannot use object of type WP_Error as array error in WordPress in 2026?
      • Cannot use object of type WP_Error as array: PHP error vs WordPress error, which is it?
      • Does isset or the null coalescing operator stop the WP_Error as array fatal on PHP 8.5 in 2026?
      • Why does wp_remote_get return a WP_Error instead of a 404 or 500 status?
      • is_wp_error vs wp_remote_retrieve_response_code in WordPress 7.1: which check does a safe handler need?
      • When a plugin hits WP_Error as array after WP_HTTP_BLOCK_EXTERNAL is set in wp-config.php, what should I allow?
      • Does switching PHP versions in AHosting cPanel remove the WP_Error as array fatal?
      • How do I find which plugin throws WP_Error as array on an AHosting account without SSH?
      • Is turning display_errors off a safe fix for a fatal like this in 2026?
      • What is the WP_Error return problem, and how does the AHosting WP_Error Decoder help?
    TL;DR

    The WP_Error as array fatal means code indexed a WP_Error object like an array, after a WordPress function failed and returned the object instead of the result. Call is_wp_error() before you touch the result, then read the error message to find what really failed.

    Cannot Use Object of Type WP_Error as Array: What the Fatal Error Means

    Cannot use object of type WP_Error as array is a PHP fatal error, not a WordPress setting. Some code received a WP_Error object and then indexed it like an array, for example with $response['body']. PHP stops the request on the spot. We reproduced the WP_Error as array fatal on a clean WordPress 7.1.5 install running PHP 8.5.10. The visitor got HTTP 500 and the text “There has been a critical error on this website”, and the debug log held one line.

    In the log, the line read PHP Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /wp-content/mu-plugins/buggy.php:5, where the path was our test file. The cause is mechanical: the WP_Error class (wp-includes/class-wp-error.php, line 19) does not implement PHP’s ArrayAccess interface, which is the interface that lets an object answer square brackets. No ArrayAccess means no brackets.

    That object only exists because something else failed first: a web request, a duplicate term, a missing taxonomy. So the fatal is the second failure. Fixing the first one is what matters, and most guides skip it.

    Why a WordPress Function Returns a WP_Error Instead of an Array

    Many WordPress functions return a union of types. The docblock above wp_remote_get() in http.php says @return array|WP_Error (the docblock is at line 184, the function at line 187). The vertical bar is the notation that PHPDoc uses for multiple types. So the caller gets an array on success and a WP_Error object on failure, and nothing in the language forces the caller to look. Rust’s Result type makes that look mandatory, while PHP leaves it to you.

    The test WordPress gives you is is_wp_error(), a single instanceof check (load.php, line 1804). The diagram shows both paths.

    How a WP_Error turns into a fatal error A function such as wp_remote_get returns either an array or a WP_Error. If the code checks is_wp_error first, it reads the error message. If it indexes the result like an array, PHP throws a fatal error when the result is a WP_Error. wp_remote_get() array or WP_Error is_wp_error() first read get_error_message() $r[‘body’] directly indexes the object Failure handled Fatal Error, HTTP 500 when it is a WP_Error

    Two details cause most of the confusion. First, an HTTP error status is not a WP_Error: in our lab api.wordpress.org answered a bad path with a 404, and wp_remote_get() returned a normal array. Second, get_term() returned null for a missing ID, a third outcome that fails in a different way.

    What We Reproduced Behind the WP_Error as Array Fatal

    We ran each call below on one local lab install (WordPress 7.1.5, PHP 8.5.10, a SQLite database, not an AHosting server) and recorded what came back. The first three network rows show why a host sees this error so often: DNS, connection and certificate failures all arrive as a WP_Error, not as a status code.

    Call we madeWhat came backDetail
    wp_remote_get, host that does not existWP_Error: http_request_failedcURL error 6: Could not resolve host
    wp_remote_get, port with no listenerWP_Error: http_request_failedcURL error 7: Failed to connect
    wp_remote_get, expired certificateWP_Error: http_request_failedcURL error 60: certificate has expired
    wp_remote_get, WP_HTTP_BLOCK_EXTERNAL trueWP_Error: http_request_not_executedUser has blocked requests through HTTP
    wp_remote_get, bad path on api.wordpress.orgNormal array, status 404Not a WP_Error
    wp_insert_term, same name twiceWP_Error: term_existsError data held the existing term ID
    get_term, ID that does not existnullNeither array nor WP_Error
    get_term, unregistered taxonomyWP_Error: invalid_taxonomyTaxonomy name not registered
    AHosting WP_Error Lab Results: WordPress 7.1.5 on PHP 8.5.10, one local install, 2 December 2026

    The blocked row matters on shared hosting: the http_request_not_executed code means WordPress itself refused to send the request, because the block constant is set in wp-config.php.

    How to Find the Plugin or Theme Behind the Fatal

    Work from the log, not from guesses. The fatal line ends with a file path and a line number, and that path names the code that indexed the object.

    1. Turn on logging without showing errors to visitors: set WP_DEBUG and WP_DEBUG_LOG to true and WP_DEBUG_DISPLAY to false in wp-config.php. In our lab the log landed in wp-content/debug.log.
    2. Reload the failing page once, then read the newest Cannot use object of type WP_Error as array line. A path such as /wp-content/plugins/example-plugin/includes/api.php:88 points at the plugin folder example-plugin.
    3. Restore the site by renaming that plugin folder in cPanel File Manager, which deactivates the plugin. Our guide to a plugin that could not be activated and our white screen walkthrough cover the same recovery.

    Delete or protect the log when you are done. A debug file inside the web root can be fetched by anyone who guesses the path, as we explain in our guide to logs in a public file.

    How to Fix WP_Error as Array in Code You Control

    Check First, Then Index

    Test the result with is_wp_error() before any bracket touches it. A safe handler reads $r = wp_remote_get( $url );, then if ( is_wp_error( $r ) ) { error_log( $r->get_error_message() ); return; }, and only then $body = wp_remote_retrieve_body( $r );. The helper wp_remote_retrieve_body() is itself guarded: it returns an empty string when it gets a WP_Error (http.php, line 316).

    Why isset() Does Not Stop the WP_Error as Array Fatal

    Developers often reach for a guard that works on arrays. On a WP_Error, none of them work. We ran each one in the lab against a failed request.

    Pattern on a failed requestResult on PHP 8.5.10Safe?
    $r[‘body’]Fatal Error: Cannot use object of type WP_Error as arrayNo
    isset( $r[‘body’] )Same fatal ErrorNo
    empty( $r[‘body’] )Same fatal ErrorNo
    $r[‘body’] ?? ”Same fatal ErrorNo
    wp_remote_retrieve_body( $r )Returns an empty string, no errorSafe, but hides the failure
    is_wp_error( $r ), then get_error_message()Returns the cURL messageYes
    Guards compared on a WP_Error result, WordPress 7.1.5 lab

    The helper functions return an empty string or an empty code for a WP_Error (http.php, lines 282 to 288), so they stop the crash and also hide the cause. Log the message first.

    Decode the WP_Error Behind Your Fatal Error

    The error code in your log is the fastest clue. Pick it below to see the usual cause and the next check. The entries come from the lab results above.

    WP_Error Decoder

    See AHosting WordPress hosting

    What to Do When WP_Error as Array Comes From Code You Did Not Write

    You cannot patch a plugin that updates itself, so decide what the WP_Error is telling you. If the message is a cURL error 6, 7 or 60 or a blocked request, the plugin is only the messenger: its web request failed at the server, and the plugin crashed on the answer. Our guide to a failed secure connection to WordPress.org shows how those server-side causes look.

    The fix above is code you can own, while the failed request behind it is where a host helps. On shared web hosting, ask support to check DNS and outbound connections from your account. If you need to control the network yourself, a VPS plan gives you that access. Either way, report the plugin bug with the exact fatal line and the WP_Error message from your log.

    Frequently Asked Questions: WP_Error as Array Fatal Error

    How do I fix the Cannot use object of type WP_Error as array error in WordPress in 2026?

    Specifically, find the file and line in the log, then make that code call is_wp_error() on the result before it indexes it. If the code belongs to a plugin, update or replace the plugin, and read the WP_Error message to learn what failed first.

    Cannot use object of type WP_Error as array: PHP error vs WordPress error, which is it?

    In practice it is both. PHP throws the fatal because the WP_Error class does not implement ArrayAccess, and WordPress supplies the object because a function failed. The PHP error is the symptom, and the WordPress failure behind it is the cause.

    Does isset or the null coalescing operator stop the WP_Error as array fatal on PHP 8.5 in 2026?

    Specifically, no. In our lab on PHP 8.5.10, isset, empty and the null coalescing operator all threw the same Error when the value was a WP_Error. For example, a check like isset on a body key still fails, so call is_wp_error first.

    Why does wp_remote_get return a WP_Error instead of a 404 or 500 status?

    Specifically, a WP_Error means the request never produced an HTTP reply, for example a failed DNS lookup or a refused connection. A 404 or 500 is a reply, so wp_remote_get returns a normal array and you read the status from it.

    is_wp_error vs wp_remote_retrieve_response_code in WordPress 7.1: which check does a safe handler need?

    In other words, they test different failures. The function is_wp_error asks whether the call failed before any reply, while wp_remote_retrieve_response_code reads the status of a reply that arrived. A safe handler needs both, in that order.

    When a plugin hits WP_Error as array after WP_HTTP_BLOCK_EXTERNAL is set in wp-config.php, what should I allow?

    Specifically, add the hostnames the plugin needs to the WP_ACCESSIBLE_HOSTS constant, or remove the block constant. Core blocks every host except your own site and localhost when WP_HTTP_BLOCK_EXTERNAL is true, and the error code you see is http_request_not_executed.

    Does switching PHP versions in AHosting cPanel remove the WP_Error as array fatal?

    In practice, no. The cause is the code treating an object as an array, and the PHP manual lists ArrayAccess for PHP 5, 7 and 8 alike, so the object behaves the same. We reproduced it on PHP 8.5.10, and a version switch only helps if a plugin update changed the code.

    How do I find which plugin throws WP_Error as array on an AHosting account without SSH?

    Specifically, set WP_DEBUG and WP_DEBUG_LOG to true and WP_DEBUG_DISPLAY to false in wp-config.php using cPanel File Manager, reload the failing page, and open wp-content/debug.log. The first path in the fatal line names the plugin or theme folder.

    Is turning display_errors off a safe fix for a fatal like this in 2026?

    Specifically, no. In our lab, with WP_DEBUG_DISPLAY set to false, the visitor still got HTTP 500 and the critical error page, because the fatal stops the request either way. Hiding the message hides your clue, and the broken page remains.

    What is the WP_Error return problem, and how does the AHosting WP_Error Decoder help?

    In other words, many functions return an array or a WP_Error, and code that assumes only the array fails on the first error. The AHosting WP_Error Decoder in this post maps the code in your log to its usual cause and to the next check.

    December 3, 2026
  • Call to a Member Function on Null in WordPress: Find the Null and Fix It (2026)

    Call to a Member Function on Null in WordPress: Find the Null and Fix It (2026)

    • What a Call to a Member Function on Null Error Means in WordPress
      • Call to a Member Function on Null vs on False: Same Bug, Different Last Word
    • Get the Site Back First: Rename the Folder the Log Names
    • Read the Log Line: Where PHP Used the Null and Who Called It
    • Where the Null Comes From: Five Sources Measured in WordPress 7.1.5
      • Why a Global Is Null When Plugin Files Load
      • Why Call to a Member Function on Null Follows Functions That Can Return Nothing
    • What Visitors See When a Call to a Member Function on Null Fires
    • Fix a Call to a Member Function on Null in Plugin or Theme Code
      • Declare the Global Where You Use It
      • Run the Code After the Object Exists
      • Check the Return Value Before You Call
      • Why the Nullsafe Operator Hides the Bug Instead of Fixing It
    • Keep a Call to a Member Function on Null From Coming Back
    • Frequently Asked Questions: Call to a Member Function on Null
      • How do you fix a fatal error in WordPress in 2026 when the log says call to a member function on null?
      • Call to a member function on null vs on false: what is the difference in WordPress?
      • Why does call to a member function on null appear right after a WordPress plugin update in 2026?
      • Which WordPress globals are null when a plugin file loads, and which cause a call to a member function on null?
      • Can I fix a call to a member function on null error from cPanel File Manager on an AHosting WordPress plan?
      • Rename vs delete: which is safer for the plugin folder named in a call to a member function on null error on AHosting?
      • Does the PHP nullsafe operator fix a call to a member function on null error in WordPress code?
      • Why does get_current_screen return null and cause call to a member function on null in wp-admin?
      • Will WordPress email me a recovery link for a call to a member function on null fatal in 2026?
      • How do I switch PHP versions in cPanel on AHosting to check whether a call to a member function on null comes from a PHP change?
    TL;DR

    A call to a member function on null error means PHP ran a method on an empty variable. Rename the plugin folder named in the log to restore the site, then fix the null at its source.

    Listen: five sources of the null, how to read the log line and how to restore a site by renaming a folder. By Matt Chrust, Director of Business Development, AHosting.

    What a Call to a Member Function on Null Error Means in WordPress

    A call to a member function on null error means PHP tried to run a method on a variable that holds nothing. The variable was supposed to hold an object, such as the database connection or the current post, and it held null instead. PHP cannot run a method on null, so it throws an Error, and WordPress logs a fatal.

    Read the message in three parts. In Call to a member function get_var() on null, get_var() is the method PHP could not run, and the last word is the type of the empty value. The message names the method but not the variable, so the method name is your first clue to which object went missing.

    A property read is milder. In our lab, get_post( 999999 )->post_title logged only a warning, Attempt to read property "post_title" on null, and the page still loaded. The same null with a method call was fatal. The idea is older than PHP: Tony Hoare added null references to ALGOL W in 1965 and later called that decision his billion-dollar mistake in a conference talk.

    Call to a Member Function on Null vs on False: Same Bug, Different Last Word

    Some WordPress functions return false instead of null when they find nothing. In our lab, get_user_by( 'id', 99999 )->exists() and a get_error_message() call on the result of get_term_by() both threw on false. The fix is the same for both. We ran only PHP 8.5.10, so the wording on other PHP versions is not measured here.

    Get the Site Back First: Rename the Folder the Log Names

    Rename the plugin folder that the log line names, and WordPress stops loading it on the next request. In our lab, a plugin that threw this error on every request made the home page, wp-login.php and wp-admin return HTTP 500. After the rename, the home page and wp-login.php returned 200.

    1. Find the log line. Add WP_DEBUG and WP_DEBUG_LOG as true and WP_DEBUG_DISPLAY as false to wp-config.php, reload the broken page, then open wp-content/debug.log. The WordPress debugging handbook documents all three constants. A debug.log left in place can be public, so read our guide to the potentially public log file warning and delete the file when you finish.
    2. Read the first wp-content path. The folder right after /wp-content/plugins/ or /wp-content/themes/ is your suspect.
    3. Rename that folder. In cPanel File Manager, open your WordPress folder, go to wp-content/plugins and rename the folder, for example to plugin-name.off.
    4. Reload the home page and wp-login.php. In our lab, WordPress then added a notice on the Plugins screen: the plugin had been deactivated due to an error because the plugin file does not exist.
    5. Fix it properly. Update or reinstall the plugin, rename the folder back, activate it with the log still open, and confirm the line is gone.

    We measured the plugin case only. A theme path works the same way in principle, but test it on a copy first. If the fatal appears at the moment you activate a plugin, read our guide to the plugin could not be activated fatal error instead.

    Read the Log Line: Where PHP Used the Null and Who Called It

    The first path in the log line is where PHP used the null. The stack trace under it lists who called that code. A stack trace is a list of every function called between the start of the script and the point of the error, so the frame list is a map back to the code that started it.

    This is what our lab test plugin produced, shortened. The first entry is the error line, and the entries after it are the trace:

    • PHP Fatal error: Uncaught Error: Call to a member function get_var() on null in /wp-content/plugins/lab-bad/lab-bad.php:3
    • #0 /wp-content/plugins/lab-bad/lab-bad.php(4): lab_bad_report()
    • #1 /wp-includes/class-wp-hook.php(353): {closure:/wp-content/plugins/lab-bad/lab-bad.php:4}('')
    • #5 {main}

    Frame #1 is a WordPress hook calling a function the plugin registered, and its name carries the file and line where the plugin registered it. The line before the fatal in our log was a warning, Undefined variable $wpdb. When the null is a variable that was never set in that scope, that warning is the giveaway.

    If the first path is inside wp-includes or wp-admin, core did not create the null. Read down the trace to the first path under wp-content, because that code handed core the bad value or ran at the wrong moment. The decoder below applies the same rules to a line you paste.

    Fatal Error Line Decoder

    Paste the PHP Fatal error line from your debug log. The tool reads it in your browser and sends nothing anywhere.

    Where the Null Comes From: Five Sources Measured in WordPress 7.1.5

    Every case we reproduced came from one of five sources: a missing global, a global used too early, a function that returned null, a function that returned false, or a hook that ran before the object existed. We ran WordPress 7.1.5 with PHP 8.5.10 on one Mac and triggered each case from a test plugin with the debug log on. This is not an AHosting server, and we did not run other PHP versions.

    SourceWhat goes wrongMessage in our labFix
    Missing global$wpdb is not in scope inside the functionget_var() on null, plus a warning, Undefined variable $wpdbAdd global $wpdb; as the first line of the function
    Global used too early$wp_query, $wp_rewrite, $wp or $post used while the plugin file loadsis_main_query(), flush_rules(), add_query_var(), to_array(), each on null, and HTTP 500Move the code into a callback on init or later
    Function returned nullget_post( 999999 ), or get_queried_object() on the home pageto_array() on null, get_page_template() on nullTest the returned value before the method call
    Function returned falseget_user_by() or get_term_by() found nothingexists() on false, get_error_message() on falseTest for false and handle the not-found case
    Hook ran too earlyAn object built on init but used on plugins_loaded, $wp_admin_bar on plugins_loaded, or get_current_screen() on admin_initrun() on null, add_node() on null, add_help_tab() on nullRegister the callback on a later hook, such as current_screen for the screen
    Table 1: Where the null comes from, measured on WordPress 7.1.5 with PHP 8.5.10

    Why a Global Is Null When Plugin Files Load

    WordPress loads its pieces in a fixed order in wp-settings.php. In 7.1.5 the database object exists at line 136, and plugin files run from line 582. The query object is created at line 652, the rewrite object at 671 and the main WordPress object at 680, all after the plugins have loaded. The init hook fires at line 779.

    When each WordPress global exists during load Eight steps of wp-settings.php in WordPress 7.1.5, in order: line 136 wpdb ready, line 508 must-use plugins load, line 582 plugins load, line 630 plugins_loaded fires, line 652 wp_query created, line 671 wp_rewrite created, line 680 wp created, line 779 init fires. Plugin files run before wp_query, wp_rewrite and wp exist, so a method call on any of them at include time hits null. Plugin files run here wp_query, wp_rewrite and wp are still null line 136wpdb ready line 508mu-plugins load line 582plugins load line 630plugins_loaded line 652wp_query line 671wp_rewrite line 680wp line 779init fires Line numbers: wp-settings.php, WordPress 7.1.5. Filled dot: ready or fired. Outlined dot: object created here.

    A plugin file that calls $wp_query->is_main_query() at the top level therefore runs before the object exists. All four early-global calls we tried at include time ended in HTTP 500. We did not test WooCommerce, so we make no claim about WC()->cart here.

    Why Call to a Member Function on Null Follows Functions That Can Return Nothing

    Many WordPress functions return nothing by design. On the latest-posts home page, get_queried_object() printed NULL in our test, so a method call on it was fatal. The developer reference for get_current_screen says the function returns the screen object or null when no screen is defined. Treat any function that can return null or false as a value to test, not an object to trust.

    What Visitors See When a Call to a Member Function on Null Fires

    It depends on when the fatal fires. Before WordPress starts sending the page, visitors get a 500 error page. After it starts, they get a cut-off page with HTTP 200 and no message at all.

    When the fatal firesHTTP statusWhat the visitor seesLog line
    Before any output: plugin load, plugins_loaded, init500A 2,681-byte page that says there has been a critical error on the websiteYes
    Inside wp_head, after output began200A cut-off page of 55,305 bytes instead of 69,200, with no error messageYes
    In wp-admin, on admin_init500A 2,857-byte page that also asks you to check the site admin email inboxYes
    The same call written with the nullsafe operator200The full page, 69,194 bytesNo
    Table 2: What the visitor, the status code and the log show, by when the fatal fires

    The cut-off page comes from the fatal error handler. In 7.1.5, class-wp-fatal-error-handler.php line 59 shows the error page only when is_admin() is true or headers have not been sent. Once the head has started streaming, there is nothing left to replace. A monitor that checks only the status code sees a 200 and calls the site healthy. A check that looks for text near the end of the page catches it.

    The admin message points to the inbox because core treats wp-login.php and wp-admin as protected endpoints. We did not test mail delivery. Our guide to the WordPress white screen of death walks through the three gates the handler applies, including why the recovery email sometimes never arrives.

    Fix a Call to a Member Function on Null in Plugin or Theme Code

    Fix the source of the null, not the line that crashed. Each of the four patterns below matches a row in Table 1.

    Declare the Global Where You Use It

    Put global $wpdb; at the top of the function, or pass the object in as an argument. In our lab, the same function with the global declared ran with no error and the page loaded in full, 69,200 bytes.

    Run the Code After the Object Exists

    Wrap early code in a hook callback. For a screen object, our lab ran the same code on current_screen without error, and the screen reported as the dashboard. On admin_init the same call was null. For $wp_query, $wp_rewrite and $wp, hooking init or later is safe by the line order above.

    Check the Return Value Before You Call

    Test the value first, for example $post = get_post( $id ); if ( ! $post ) { return; }. Where you control the code that returns the value, Martin Fowler describes the Special Case pattern: return an object that behaves safely in place of null, so callers need no check.

    Why the Nullsafe Operator Hides the Bug Instead of Fixing It

    Since PHP 8.0 the nullsafe operator in the PHP manual returns null instead of throwing when the object is null. In our lab, get_post( 999999 )?->to_array() printed NULL, the home page loaded in full and debug.log stayed empty. The crash was gone, and so was the only evidence of the bug. Use it where null is an expected answer, not to quiet a fatal.

    If your log shows a different PHP 8 fatal, see our guide to unsupported operand types in WordPress.

    Keep a Call to a Member Function on Null From Coming Back

    Most of these errors arrive with an update, so the prevention is a routine, not a plugin.

    • Update one plugin at a time, and read debug.log after each one.
    • Copy the plugin folder before you update, so a rollback is a rename.
    • Test updates on a copy of the site first.
    • Turn the debug log off, and delete debug.log, when you finish.

    Everything above works on any cPanel host. On AHosting WordPress hosting, cPanel File Manager is where you do the rename, and MultiPHP Manager is where you switch a site between PHP versions to see whether a fatal follows the version. If you run other PHP applications beside WordPress, web hosting gives you the same tools for each site. When you need your own staging copy or direct access to the server PHP error log, a VPS is the next step up.

    Frequently Asked Questions: Call to a Member Function on Null

    How do you fix a fatal error in WordPress in 2026 when the log says call to a member function on null?

    Specifically, read the first file path in the log line, rename that plugin or theme folder in cPanel File Manager to get the site back, then fix the null at its source. In our lab, renaming the plugin folder changed the home page and wp-login.php from HTTP 500 to HTTP 200. The sections above show how to find the null.

    Call to a member function on null vs on false: what is the difference in WordPress?

    In practice, the difference is only the type of the empty value. On null means a variable was never set or a function returned nothing, such as get_post for a missing ID. On false means a function returned false, as get_user_by and get_term_by do when nothing matches. Both stop the request the same way, and both need a check before the method call.

    Why does call to a member function on null appear right after a WordPress plugin update in 2026?

    Typically, the update changed when or where the plugin creates an object, or it now calls code from another plugin that has not loaded yet. The null shows up on the first request that runs the new code. Rename the plugin folder named in the log, restore the previous version, and re-test on a copy of the site with the log open.

    Which WordPress globals are null when a plugin file loads, and which cause a call to a member function on null?

    Notably, in WordPress 7.1.5 the database object wpdb already exists when plugin files load, but wp_query, wp_rewrite, wp and post do not. In our lab, a method call on each of those four at include time threw a call to a member function on null fatal. Move that code into a callback on the init hook or later.

    Can I fix a call to a member function on null error from cPanel File Manager on an AHosting WordPress plan?

    Fortunately, yes, if the log names a plugin or theme folder. Renaming that folder in cPanel File Manager stops WordPress from loading it, and the site comes back. That removes the symptom only, so the null still needs a code fix or a plugin update afterward.

    Rename vs delete: which is safer for the plugin folder named in a call to a member function on null error on AHosting?

    In practice, rename. A name such as plugin-name.off stops WordPress from loading the code but keeps it on disk so you can restore or compare it later. Deleting removes the code you may need for a rollback. After our rename, WordPress showed its own notice that the plugin was deactivated because the plugin file does not exist.

    Does the PHP nullsafe operator fix a call to a member function on null error in WordPress code?

    Specifically, no, it hides the error. The nullsafe operator makes the call return null when the object is null, so the fatal and the log line disappear, as our lab showed with a home page that loaded in full. The bug stays, and the value your code expected is silently missing. Use it only where null is an expected result.

    Why does get_current_screen return null and cause call to a member function on null in wp-admin?

    In particular, WordPress sets the current screen late in an admin request, and the function returns null until then, as the developer reference states. Our lab hit the fatal by calling add_help_tab on the admin_init hook. The same screen object was available on the current_screen hook, so move the code there.

    Will WordPress email me a recovery link for a call to a member function on null fatal in 2026?

    However, it depends on where the fatal fires. WordPress core treats wp-login.php and wp-admin as protected endpoints, and our lab admin error page told us to check the site admin email inbox. The front-end error page carried no such instruction. We did not test mail delivery, so check the admin address and the spam folder.

    How do I switch PHP versions in cPanel on AHosting to check whether a call to a member function on null comes from a PHP change?

    In practice, open MultiPHP Manager in cPanel, pick the domain, select another PHP version, and reload the failing page with the log open. If the fatal follows the version, a plugin is calling behavior that changed. If it stays on every version, the null is a logic or load order bug. We ran only PHP 8.5.10 in our lab.

    December 2, 2026
  • Unsupported Operand Types String + Int in WordPress: What It Means and How to Fix It (2026)

    Unsupported Operand Types String + Int in WordPress: What It Means and How to Fix It (2026)

    • What Unsupported Operand Types Means in WordPress
    • Which Values Trigger the Unsupported Operand Types Error in PHP 8
    • Test a Value Against the Unsupported Operand Types Rule
    • Why the Error Hits Some Posts and Not Others
    • Find the Plugin Behind the Unsupported Operand Types Error
    • Fix the Unsupported Operand Types Error Without Hiding Bad Data
      • If the code is yours
      • If it is a plugin or theme
      • When a PHP rollback is reasonable
    • What Visitors, Admins and Your Inbox See
    • Frequently Asked Questions: Unsupported Operand Types
      • What does the unsupported operand types error mean in WordPress in 2026?
      • How do I fix unsupported operand types in WordPress on AHosting without downgrading PHP?
      • Why does unsupported operand types appear after upgrading to PHP 8 in 2026?
      • Can I switch PHP versions per site on AHosting to get past unsupported operand types?
      • Is casting with (float) vs an is_numeric check safer for unsupported operand types errors?
      • Does a PHP 8.1 vs PHP 8.5 site throw unsupported operand types differently in 2026?
      • Why do I get unsupported operand types on some pages but not others?
      • Will WordPress send a recovery mode email when unsupported operand types breaks a public page?
      • How can AHosting customers find the plugin behind a fatal TypeError in 2026?
      • Can a try catch block stop the unsupported operand types fatal error in a plugin?
    TL;DR

    Unsupported operand types means PHP 8 refused to do math on text that is not a number. Empty strings, plain words and values such as $10 throw the fatal error, while null and false pass and text that starts with a digit only warns. Read the log line to find the file, guard the value with is_numeric(), and avoid a blind cast, because a cast turns the crash into a silent zero.

    Listen: which values throw the error, why it hits some posts only and how to find the plugin behind it. By Matt Chrust, Director of Business Development, AHosting.

    What Unsupported Operand Types Means in WordPress

    The line Fatal error: Uncaught TypeError: Unsupported operand types: string + int means PHP 8 tried to do arithmetic on a value that is not a number and refused. Unsupported operand types is the engine’s wording: the two names after the colon are the types of the left and right operands, in that order, so “string + int” says the left side was text and the right side was a whole number.

    PHP 7 only warned and treated the text as 0. The PHP manual now says that if a string used in arithmetic is not numeric, PHP throws a TypeError, and it notes that before 8.0 the same code raised a warning and returned 0. The change came from the Saner numeric strings RFC, which is marked as implemented in PHP 8.0, and its author discussed it with a host on the PHP Internals News podcast.

    WordPress did not cause this. Core only caught the fatal and drew the critical error page, so the fix lives in the plugin, theme or snippet doing the math. A neighboring PHP 8 message, Undefined array key, is only a warning, and our Undefined array key guide covers it.

    Which Values Trigger the Unsupported Operand Types Error in PHP 8

    We ran one operation against 16 values on PHP 8.5.10 and recorded what each did. The pattern is simple: a string with no leading number throws, a string with a leading number warns, and everything numeric passes.

    ValueResult with + 2 (PHP 8.5.10)Why
    "abc"TypeError: string + intNo number at all
    "" (empty string)TypeError: string + intEmpty is not numeric
    " " (one space)TypeError: string + intWhitespace only
    "$10"TypeError: string + intA currency symbol comes first
    "5", " 5", "5 "Result is 7Whitespace on either side is allowed
    "1e3"Result is 1002.0Exponent notation is numeric
    "5 apples"Warning, then 7Leading number is used
    "0x1A"Warning, then 2Only the leading 0 counts
    "1,5"Warning, then 3The comma ends the number
    null, falseResult is 2Both count as 0
    [] (array)TypeError: array + intArrays are not valid operands
    Table 1: What PHP 8.5.10 does with each value in arithmetic

    Subtraction gave the same pattern for every value, and multiplication and modulo matched on the text cases we ran. Concatenation does not throw: "abc" . 2 simply gives abc2. We ran this on one Mac with PHP 8.5.10, not on an AHosting server, and we did not run PHP 8.0 through 8.4 ourselves, although the manual dates the TypeError to 8.0.0.

    Test a Value Against the Unsupported Operand Types Rule

    Use the checker below to try your own value. It applies the rules from Table 1 to common cases and does not model every exotic format, such as octal or binary strings.

    PHP 8 Operand Checker

    Type a value, pick the type and the operator, and see what PHP 8 does when the other side is an integer.

    Jump to the fix options

    Why the Error Hits Some Posts and Not Others

    Most WordPress values arrive as strings. The get_post_meta documentation says numbers are returned as strings, a stored false comes back as an empty string, and a key that does not exist gives an empty string when $single is true. Core confirms it: get_metadata_default() in meta.php sets $value = '' for the single case.

    That explains the classic symptom. We wrote a shortcode that multiplies a saved price by 1.2 and placed it on three posts. The post with a saved price of 10 returned HTTP 200 and a total of 12. The post that never saved a price returned HTTP 500, and so did a post whose price was saved as $10. Same code, three outcomes, depending only on the stored text.

    How one unsaved value becomes a critical error page Four steps left to right. A post never saved the price field. get_post_meta returns an empty string. The code multiplies the empty string by 1.2. PHP 8 throws Unsupported operand types and the visitor gets HTTP 500 with the critical error message. Post never saved the price field get_post_meta returns an empty string Code does empty string * 1.2 TypeError HTTP 500 page Lab: WordPress 7.1.5, PHP 8.5.10. Saved price 10 gives a total. No price or $10 gives HTTP 500.

    Field plugins widen the gap, because each field type returns different forms of data, including strings, integers and arrays. An option behaves differently: get_option() returns false for a missing option, and false + 1 is fine, but get_option('x', '') hands back an empty string and the same math fails.

    Find the Plugin Behind the Unsupported Operand Types Error

    The visitor sees only “There has been a critical error on this website.” The detail is in the PHP error log, and the steps below get you to the file in a few minutes.

    1. Add define( 'WP_DEBUG', true );, define( 'WP_DEBUG_LOG', true ); and define( 'WP_DEBUG_DISPLAY', false ); to wp-config.php above the line that says to stop editing.
    2. Reload the failing page once, then open wp-content/debug.log. In our lab no log file existed with WP_DEBUG off, so the log only appears after step 1.
    3. Read the first line. Ours was PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * float in .../wp-content/mu-plugins/lab.php:3.
    4. Take the folder after wp-content/plugins/ or wp-content/themes/ as the culprit, and the number after the colon as the line.
    5. Look at the stack trace below it. It names the WordPress function that called the code, such as do_shortcode, which tells you whether a shortcode, widget or template triggered it.

    Remove the three constants when you are done. Your host’s own PHP error log may also hold the line, but we did not measure that on an AHosting server. If the fatal appears the moment you activate something, our plugin activation fatal error guide covers that case, and a Deprecated line in the same log is a different notice that our dynamic property guide explains.

    Fix the Unsupported Operand Types Error Without Hiding Bad Data

    Every fix either repairs the value or hides it. The table compares the common options, using the two bad values from our lab, an empty price and $10.

    FixEffect on an empty value and $10Verdict
    Cast with (float)Both become 0 and the page loadsHides bad data
    is_numeric() guardYou choose: skip, default or messageBest for your own code
    Fill the blank settingRemoves the trigger on that postQuick, per post
    Update the plugin or themeVendor adds the guardDo this first
    try and catch TypeErrorPage survives, cause staysSafety net only
    Roll PHP back to 7.4Warning and 0 instead of a fatalShort bridge
    Table 2: Fixes for unsupported operand types compared

    If the code is yours

    Check before you calculate: is_numeric( $p ) ? $p * 1.2 : null. Avoid the shortcut cast. In our lab (float) "$10" returned 0 and (int) "1,500" returned 1, so a price page loaded with a wrong number and no error at all, which is worse than a crash. PHP keeps explicit casts unchanged on purpose, and the internals-list thread on the RFC discusses preserving results such as (int) "2px", which is exactly why a cast silences the error.

    If it is a plugin or theme

    Update it first, then open its changelog and support forum with the log line in hand. Fill any blank numeric setting the stack trace points to, such as a columns or quantity field. Do not edit the plugin files, because an update overwrites them, and put your own patch in a child theme or a small mu-plugin.

    When a PHP rollback is reasonable

    In cPanel, MultiPHP Manager sets the PHP version per site, and a rollback gets a broken store selling again while you wait for a patch. PHP 7.4 no longer receives security fixes, so treat it as a bridge, and see our best PHP version for WordPress guide for the target. If you would rather not manage versions and logs yourself, our WordPress hosting plans are built around that workflow.

    What Visitors, Admins and Your Inbox See

    With display_errors off, our visitor request returned HTTP 500 and a 2,704-byte page with only the generic critical error message. With display_errors on, the page also printed the full fatal message, the stack trace and the server paths to every visitor, so keep display off in production and read the log instead.

    The surprise is the email. Core’s recovery mode handler returns a non_protected_endpoint error and sends nothing when the fatal happens on a public page. By default only wp-login.php, admin screens and protected AJAX actions count as protected endpoints, so a broken front-end page can stay broken until a visitor tells you. Check the log after every PHP upgrade, and if you run your own stack on a VPS, the same line sits in your PHP and web server logs. On shared plans, our web hosting accounts use the cPanel tools described above.

    Frequently Asked Questions: Unsupported Operand Types

    What does the unsupported operand types error mean in WordPress in 2026?

    Specifically, it means PHP 8 tried to do arithmetic on a value that is not a number and stopped with a fatal TypeError. The two types in the message are the left and right operands, so string + int means text on the left and a whole number on the right.

    How do I fix unsupported operand types in WordPress on AHosting without downgrading PHP?

    Specifically, read the PHP error log for the file path, then update or patch that plugin or theme. In your own code, check the value with is_numeric before the math and decide on purpose what a missing value should do instead of casting it to zero.

    Why does unsupported operand types appear after upgrading to PHP 8 in 2026?

    Indeed, the check is new in PHP 8.0. Before 8.0 the same line raised a warning and used 0, and the PHP manual says a non-numeric string now throws a TypeError, so old plugin code that never checked its input starts failing.

    Can I switch PHP versions per site on AHosting to get past unsupported operand types?

    Specifically, cPanel MultiPHP Manager lets you pick a PHP version for each site. A rollback to 7.4 only buys time, because that branch no longer receives security fixes, so use it as a short bridge while the plugin gets patched.

    Is casting with (float) vs an is_numeric check safer for unsupported operand types errors?

    In practice, is_numeric is safer. In our test a (float) cast turned both an empty value and the text $10 into 0, so the page loaded with a wrong total and no error, while an is_numeric check lets you skip the math or show a message.

    Does a PHP 8.1 vs PHP 8.5 site throw unsupported operand types differently in 2026?

    As a result of the PHP 8.0 change, both throw it. The manual dates the TypeError to 8.0.0 and we measured only PHP 8.5.10, so we did not run 8.1 through 8.4 ourselves, but nothing in the manual suggests a difference.

    Why do I get unsupported operand types on some pages but not others?

    In particular, the value comes from post meta or an option, and a post that never saved it returns an empty string. In our lab the same shortcode returned a total on a post with a saved price and a fatal on posts with no price or with $10.

    Will WordPress send a recovery mode email when unsupported operand types breaks a public page?

    In fact, no. WordPress core only sends the recovery email when the fatal happens on a protected endpoint such as wp-admin or wp-login.php, so a fatal on a public page gives visitors an error and gives you nothing unless you read the log.

    How can AHosting customers find the plugin behind a fatal TypeError in 2026?

    Typically, turn on WP_DEBUG_LOG, reload the failing page, and open the log in cPanel File Manager. The first path under wp-content/plugins or wp-content/themes in the line names the culprit, and the lines below it show which WordPress function called it.

    Can a try catch block stop the unsupported operand types fatal error in a plugin?

    In practice, it can keep the page alive, because TypeError is catchable. It also hides the cause, so use it as a safety net around third-party code you cannot edit and still fix the value that triggered it.

    December 1, 2026
  • Deprecated: Creation of Dynamic Property in WordPress: What It Means and How to Fix It (2026)

    Deprecated: Creation of Dynamic Property in WordPress: What It Means and How to Fix It (2026)

    • What the Creation of Dynamic Property Notice Says in WordPress
    • Why the Notice Started With PHP 8.2
    • When the Creation of Dynamic Property Notice Prints and When WordPress Hides It
    • How the Notice Can Break Login
    • Find the Plugin Causing the Issue
    • How to Fix the Creation of Dynamic Property Notice
      • Fixes That Do Not Remove the Creation of Dynamic Property Notice
      • Fixes That Do Remove the Creation of Dynamic Property Notice
    • When to Open a Ticket
    • Frequently Asked Questions About the Creation of Dynamic Property Notice
      • How do I turn off the creation of dynamic property warning in WordPress in 2026?
      • Is the creation of dynamic property notice a warning or an error on a WordPress site?
      • Why does the creation of dynamic property notice show up only after I move to PHP 8.2 or newer in 2026?
      • Creation of dynamic property notice vs undefined array key warning: which is more serious on a WordPress site?
      • Should I use the AllowDynamicProperties attribute vs declaring the property in a plugin I wrote myself?
      • Can AHosting support help find which plugin causes the creation of dynamic property notice on my site?
      • Which PHP versions do AHosting sites run in 2026, and do they show the creation of dynamic property notice?
      • Does updating the plugin always remove the creation of dynamic property notice from the page?
      • Can I change the PHP version for one site in my AHosting cPanel without touching my other sites?
      • What does the creation of dynamic property notice look like inside debug.log in 2026?
    TL;DR

    The creation of dynamic property notice means code wrote to an object property its class never declared, which PHP 8.2 and later flag. It prints only when WP_DEBUG is on, because WordPress drops deprecations itself when it is off. In our lab a printed notice blocked the login page, and the popular error_reporting line in wp-config.php did not hide it. The path in the notice names the plugin or theme to update.

    Listen: what the notice means, when WordPress prints it and how to find the plugin behind it. By Matt Chrust, Director of Business Development, AHosting.

    What the Creation of Dynamic Property Notice Says in WordPress

    The creation of dynamic property notice is PHP telling you that some code assigned a value to an object property its class never declared. The full line reads Deprecated: Creation of dynamic property Name::$property is deprecated in /path/file.php on line N. It is a deprecation, which is advance notice and not a failure: in our lab the page still returned HTTP 200 and every line after the notice still ran.

    Each part of the line is a clue. The class name before the double colon is the code that did the assigning, the word after the dollar sign is the property it invented, and the path and line number point at the assignment itself. Because the path usually starts with wp-content/plugins/ or wp-content/themes/ followed by a folder name, the notice normally names its own culprit.

    Why the Notice Started With PHP 8.2

    Before PHP 8.2, writing to a property a class had not declared quietly created it, so a typo such as nane for name became a silent bug. The PHP RFC that deprecated dynamic properties sets the schedule: PHP 8.2 raises the deprecation and still creates the property, and PHP 9.0 throws an Error exception. The RFC exempts stdClass and classes that handle writes through __get and __set. It also adds the #[AllowDynamicProperties] attribute for classes that need the old behavior on purpose.

    Old plugins and themes trip over it because their authors wrote $this->settings = array() in a constructor without a matching public $settings line, which worked on every earlier PHP version. Your host decides when you meet the notice, because the host decides the PHP version. On one AHosting shared server, 524 site folders carry the cPanel PHP handler block: 374 select PHP 8.4 and 142 select PHP 8.2 (counted 2026-10-21). Both versions raise the notice, so a plugin with this habit raises it on either.

    When the Creation of Dynamic Property Notice Prints and When WordPress Hides It

    Most site owners never see this notice on a live site, and the reason is in WordPress rather than PHP. The function wp_debug_mode() in wp-includes/load.php sets error_reporting() on every request. With WP_DEBUG on, line 614 sets E_ALL. With it off, line 635 sets a shorter list that leaves out E_DEPRECATED, so the notice is dropped before it can print or log, whatever php.ini says.

    How WordPress decides whether a deprecation notice prints PHP raises E_DEPRECATED. WordPress runs wp_debug_mode on every request. If WP_DEBUG is false, error_reporting leaves out E_DEPRECATED and the notice is dropped. If WP_DEBUG is true, error_reporting is E_ALL, the notice prints on the page when display is on, and is written to a log file when WP_DEBUG_LOG is set. PHP 8.2 or later raises E_DEPRECATED WordPress runs wp_debug_mode() on every request WP_DEBUG is false error_reporting() gets a list that leaves out E_DEPRECATED (line 635) WP_DEBUG is true error_reporting( E_ALL ) is set (line 614) Dropped Not printed and not logged, whatever php.ini says On the page when display is on (WP_DEBUG_DISPLAY) In a log file when WP_DEBUG_LOG is set

    Turning WP_DEBUG on changes the picture, and three more settings then decide what happens: WP_DEBUG_DISPLAY, WP_DEBUG_LOG and the PHP display_errors value. We ran one test class through the combinations on WordPress 7.1.5 and PHP 8.5.10. Our guide to why the default debug log sits in a public folder explains the log row.

    WP_DEBUGWP_DEBUG_DISPLAYWP_DEBUG_LOGPrinted on the page?Written to a log file?
    falseanynot setNoNo, E_DEPRECATED is removed at line 635
    truetruefalseYes, above the doctypeNo
    truefalsea file pathNoYes, one line per notice
    truenot definedfalseYes in the lab, because its display_errors was onNo
    true, plus error_reporting(E_ALL & ~E_DEPRECATED); in wp-config.phptruefalseYes, the line had no effectNo
    AHosting WP_DEBUG Notice Visibility Table: the same old-style plugin class on WordPress 7.1.5 and PHP 8.5.10, one request per row, measured 2026-11-26 on a Mac lab, not on an AHosting server.

    The last row is the one to remember. A forum answer that ranks for this notice says to add error_reporting(E_ALL & ~E_DEPRECATED); to wp-config.php. That line runs before wp-settings.php loads, so wp_debug_mode() overwrites it, and the notice printed anyway in our lab.

    How the Notice Can Break Login

    A deprecation that prints is not harmless, because it is output, and output sent before the headers blocks anything that sends a header afterwards. With display on, the notice appeared 295 characters before the <!DOCTYPE html> on the home page. We then posted correct credentials to wp-login.php. A clean class got a 302 redirect and four cookies, while the old-style class got HTTP 200, zero cookies and the message Cannot modify header information – headers already sent. A notice alone locked the admin out.

    The same rule affects JSON. A REST request without a JSON Accept header came back as HTML that began with the notice, which is why WordPress forces display off for JSON requests at lines 642 to 646. Our guide to the headers already sent warning and our guide to the Updating failed JSON error cover the two symptoms in detail. If a notice is the first thing on a login page you cannot pass, turn display off before you do anything else.

    Find the Plugin Causing the Issue

    1. Read the path in the first notice. A folder under wp-content/plugins/ or wp-content/themes/ names the code, and wp-content/mu-plugins/ names a must-use plugin.
    2. Confirm it. Rename that folder in cPanel File Manager, or deactivate the plugin, reload the page and check that the notice is gone. Rename the folder back afterwards.
    3. Open the plugin changelog and look for dynamic property or PHP 8.2 wording. If an update exists, take it on a staging copy first.

    The decoder below turns the path and what you see into the next step. When the path names a core file, the real culprit is usually printed one message higher.

    Dynamic Property Notice Decoder

    Compare AHosting WordPress hosting plans

    How to Fix the Creation of Dynamic Property Notice

    Fixes That Do Not Remove the Creation of Dynamic Property Notice

    Adding the error_reporting() line to wp-config.php does nothing while WP_DEBUG is on, as the table showed. Moving the site back to PHP 8.1 hides the notice only by running a PHP branch that the php.net supported versions page no longer lists, and PHP 8.2 itself loses security support on 31 December 2026. Editing the plugin file works until the next update overwrites it.

    Fixes That Do Remove the Creation of Dynamic Property Notice

    On a live site, leave WP_DEBUG off. WordPress’s own debugging guide says these tools are meant for local testing and staging installs, not production. On a staging copy, set WP_DEBUG_DISPLAY to false and give WP_DEBUG_LOG a path outside the web root, so the notice goes to a file instead of the page. Then update the plugin, or send its developer the exact path and line, because only a change in the class removes the cause.

    If the code is yours, the class decides what silences the notice. PHPStan’s guide to its undefined property error lists three legitimate routes for dynamic properties: magic methods, stdClass and the attribute. Psalm flags the same pattern before it runs, as UndefinedThisPropertyAssignment. We tested six declarations with the old plugin pattern.

    Class declarationNotice raised?What it means
    No declaration (the old plugin habit)YesThe property is created on the fly
    public $settings; declared in the classNoThe write targets a declared property
    #[AllowDynamicProperties] on the classNoThe class opts in to dynamic properties
    A child of a class that has the attributeNoThe effect is inherited, without repeating the attribute
    A class with a __set() methodNoThe method handles the write
    stdClassNoThe one bundled class that allows it
    AHosting Class Declaration Test Table: six classes assigning one property on PHP 8.5.10 with WP_DEBUG and display on, measured 2026-11-26.

    Declaring the property is the fix when its name is known. The attribute suits a class that truly holds arbitrary properties, and per the RFC both routes keep working in PHP 9.0, while the undeclared write becomes an Error.

    When to Open a Ticket

    If the notice is still there after the plugin is updated or its folder is renamed, open a ticket with the full notice text, starting with the path, and we will look at it with you. On our AHosting web hosting plans the PHP version is picked per domain in cPanel, so one site can be tested without touching the others.

    A store usually runs more plugins than a brochure site, so a WooCommerce hosting plan has more places for a notice to start. That is reasoning, not a measurement. The check is the same on any plan: read the path, find the folder, update the code.

    Frequently Asked Questions About the Creation of Dynamic Property Notice

    How do I turn off the creation of dynamic property warning in WordPress in 2026?

    Specifically, set WP_DEBUG to false in wp-config.php, or keep it on and set WP_DEBUG_DISPLAY to false with WP_DEBUG_LOG pointing at a file. In our lab either change removed the notice from every page. An error_reporting line in wp-config.php did not.

    Is the creation of dynamic property notice a warning or an error on a WordPress site?

    In practice it is a deprecation notice, which is advance warning. In our lab the page still returned HTTP 200 and the code after the notice still ran. However, the PHP RFC says it becomes an Error exception in PHP 9.0, so the cause needs fixing.

    Why does the creation of dynamic property notice show up only after I move to PHP 8.2 or newer in 2026?

    Indeed, PHP 8.1 and earlier create the property silently and say nothing. PHP 8.2 added the deprecation, so an old plugin that never declared its property starts reporting the day the site moves to 8.2, 8.3, 8.4 or 8.5.

    Creation of dynamic property notice vs undefined array key warning: which is more serious on a WordPress site?

    Typically the undefined array key warning is the more serious one, because it means code read a value that does not exist and carried on with null. The dynamic property notice only warns about a write that still succeeds today. Both print only when debugging is on.

    Should I use the AllowDynamicProperties attribute vs declaring the property in a plugin I wrote myself?

    For example, declare the property when you know its name, because that also protects you from typos. Use the attribute only for a class that really holds arbitrary properties. The RFC keeps attributed classes working in PHP 9.0, but an undeclared write becomes an Error.

    Can AHosting support help find which plugin causes the creation of dynamic property notice on my site?

    Specifically, yes. Open a ticket with the full notice text, including the file path and line number, and we will look at it with you. That path usually names the plugin or theme before anyone has to guess.

    Which PHP versions do AHosting sites run in 2026, and do they show the creation of dynamic property notice?

    As a result of per-domain PHP settings, versions differ by site. On one shared server we counted 524 site folders with the PHP handler block: 374 select PHP 8.4 and 142 select PHP 8.2. Both versions raise the notice, but it prints only when WP_DEBUG and display are on.

    Does updating the plugin always remove the creation of dynamic property notice from the page?

    In practice only when the developer shipped a fix. Read the changelog for dynamic property or PHP 8.2 wording, update, then reload and look for the same file and line. If the notice remains, send the developer that exact line.

    Can I change the PHP version for one site in my AHosting cPanel without touching my other sites?

    In practice, yes. The PHP version is chosen per domain in the cPanel MultiPHP Manager. That said, going back to PHP 8.1 only hides the notice, and the php.net supported versions page no longer lists 8.1, so fix the plugin instead.

    What does the creation of dynamic property notice look like inside debug.log in 2026?

    Specifically, one line per occurrence that starts with the date, then PHP Deprecated: Creation of dynamic property Class::$property is deprecated in a file path on line N. Because that file can sit inside the web root, point WP_DEBUG_LOG at a path outside it.

    November 29, 2026
  • This Site Can’t Be Reached in WordPress: What Each Chrome Code Means and Who Fixes It (2026)

    This Site Can’t Be Reached in WordPress: What Each Chrome Code Means and Who Fixes It (2026)

    • What This Site Can't Be Reached Means in WordPress
      • It Is Chrome Speaking, Not WordPress
    • This Site Can't Be Reached: What Each Chrome Code Tells You
      • Why Refused and Timed Out Differ
    • Is It Your Network, the Domain or the Server? Three Commands
    • Why Only wp-admin Says This Site Can't Be Reached
      • The Repair Without the Dashboard
    • What Each Code Needs From Your Host
    • This Site Can't Be Reached: Fix Checklist
    • Frequently Asked Questions: This Site Can't Be Reached
      • How do I fix this site can't be reached on a WordPress website in 2026?
      • Why does this site can't be reached appear only on wp-admin and the WordPress login page?
      • Is this site can't be reached a WordPress error or a browser error in 2026?
      • What is the difference between ERR_CONNECTION_REFUSED vs ERR_CONNECTION_TIMED_OUT for this site can't be reached?
      • Does this site can't be reached mean my AHosting server is down?
      • Can a recent DNS change cause this site can't be reached on a new WordPress site?
      • What should I send AHosting support when this site can't be reached after a WordPress move?
      • Can a VPN or antivirus be the reason this site can't be reached in 2026?
      • Should I use an online DNS checker vs the command line when this site can't be reached?
      • Can I fix a wrong WP_HOME on AHosting with cPanel File Manager when wp-admin will not load?
    TL;DR

    This site can’t be reached is Chrome telling you it got no usable answer, and the code under the message names the layer that failed: DNS, the connection, or the secure handshake. We forced seven failures in Chrome 158 and each printed a different code. A wrong WordPress address can break wp-admin while the front end stays up. Three commands, dig and two curl lines, tell you which layer to chase.

    Listen: what the message hides, how the codes differ and what to run first. By Matt Chrust, Director of Business Development, AHosting.

    What This Site Can’t Be Reached Means in WordPress

    This site can’t be reached is the message Chrome prints when it gets no usable answer from the address in the bar. It is not a WordPress message, and it is not an HTTP status either. The page you wanted was never delivered, so nothing in WordPress, PHP or your theme had a chance to say anything.

    That matters because most advice for this site can’t be reached starts with clearing the cache and restarting the router. Those steps help when the fault is on your side. They do nothing when the fault is a missing DNS record or a server that is not listening, and the browser tells you which one, in a code printed small under the message.

    It Is Chrome Speaking, Not WordPress

    Chrome decides in four stages: it looks up the name, opens a connection, shakes hands for https and then asks for the page. A failure at any stage before the page arrives ends in a message like this one. Chromium keeps the full list of those failures in its net error list, and the next section shows seven of them measured.

    This Site Can’t Be Reached: What Each Chrome Code Tells You

    We forced each failure on one Mac with Chrome 158 and read the error the browser reported. The lab was a Python socket server, a closed local port and a made-up hostname ending in .invalid. It was not an AHosting server, and it was not Firefox or Safari, so read the table as how Chrome behaves, not as a measure of any host.

    Where each Chrome error code is raised Four boxes in a row: DNS lookup, TCP connection, secure handshake and the HTTP request. Under DNS lookup the code DNS_PROBE_FINISHED_NXDOMAIN. Under the connection ERR_CONNECTION_REFUSED and ERR_CONNECTION_TIMED_OUT. Under the secure handshake ERR_SSL_PROTOCOL_ERROR. Under the request ERR_CONNECTION_RESET and ERR_EMPTY_RESPONSE. A note says that any status page such as 403, 500 or 502 means a server answered, so it is a different problem. Four stages, four families of code 1. DNS lookup name to address 2. Connection TCP to the port 3. Secure handshake https only 4. Request the page is asked for DNS_PROBE_ FINISHED_NXDOMAIN Fix: domain, nameservers, A record ERR_CONNECTION_REFUSED ERR_CONNECTION_TIMED_OUT Fix: server, port, firewall, wrong IP ERR_SSL_PROTOCOL_ERROR Fix: https on a port that does not speak TLS ERR_CONNECTION_RESET ERR_EMPTY_RESPONSE Fix: a rule or crash closes the connection A status page such as 403, 500 or 502 means a server answered. That is a different problem.
    Code printed by ChromeHeading Chrome showedWhat we didFirst place to look
    DNS_PROBE_FINISHED_NXDOMAINThis site can’t be reachedOpened a made-up .invalid nameDomain, nameservers, A record
    ERR_CONNECTION_REFUSEDThis site can’t be reachedOpened a local port with nothing listeningServer stopped, wrong IP or port
    ERR_CONNECTION_TIMED_OUTNot capturedConnected to an address that never repliesFirewall drop, wrong IP, route
    ERR_CONNECTION_RESETThis site can’t be reachedServer accepted, then sent a resetSecurity rule, limit, crash
    ERR_EMPTY_RESPONSEThis page isn’t workingServer accepted, then closed with no dataError log, crash, closing rule
    ERR_SSL_PROTOCOL_ERRORThis site can’t provide a secure connectionUsed https against a plain HTTP listenerhttps on a port without TLS
    ERR_CONNECTION_CLOSEDThis site can’t be reachedUsed https against PHP’s built-in serverSame as the row above
    Chrome 158 connection error code table: what each forced failure printed, measured 2026-11-25 on one Mac.

    Three details are easy to miss. The empty-response case printed a different heading, This page isn't working, so searching for the heading alone misses it. The same mistake, https spoken to a server that only talks HTTP, printed two different codes depending on what was listening. And the timeout was not instant: our attempt had not failed at 120 seconds and had failed by 127.

    Why Refused and Timed Out Differ

    The reasons behind refused and timed out are old networking behavior, not a Chrome invention. The Nmap port-state documentation describes a closed port as reachable with no application listening, and a filtered port as one where packet filtering stops the probe, with silent drops far more common than error replies. That is exactly the gap between a fast refusal and a slow timeout.

    Is It Your Network, the Domain or the Server? Three Commands

    Run these from your own computer. Replace the example domain with yours.

    dig +short www.example.com
    curl -sI https://www.example.com/wp-admin/
    curl -sI --resolve www.example.com:443:203.0.113.10 https://www.example.com/

    The first line asks your resolver for the address. No output means no address, which is the DNS_PROBE_FINISHED_NXDOMAIN case. For our own domain, on 2026-11-25, it returned two addresses that belong to Cloudflare, because www.ahosting.net sits behind that proxy. If your site does too, the address you see is the proxy’s, not your server’s.

    The second line is the one that saves time. A reply with a status line means a server answered, and the location header shows where wp-admin sends you. If that header names a host that is not your domain, you have found the cause without opening a browser. The third line swaps in the server’s own address, so you can test the server while DNS is wrong, stale or still changing. Use the real address from your hosting account in place of the documentation address shown.

    For a second opinion without a terminal, Google Public DNS answers lookups as JSON. The made-up .invalid name returned Status 3 there, the code for a name that does not exist, and example.com returned Status 0 with two addresses. dig on our Mac agreed: NXDOMAIN.

    AHosting Can’t-Be-Reached Decoder

    See WordPress hosting plans

    Why Only wp-admin Says This Site Can’t Be Reached

    A common version of this site can’t be reached is a front end that loads while wp-admin and the login page fail. After a move, a domain change or a switch to https, WordPress can hold an address that no longer exists. The dashboard builds its login URL from that address, so it sends your browser there.

    We reproduced it on WordPress 7.1.5 by setting both address constants to a hostname that does not resolve. A request for wp-admin on the real host got a 302 whose Location was the login page on the other host. Chrome followed it and printed DNS_PROBE_FINISHED_NXDOMAIN for that other host. The code is accurate, but the address in the bar was not the one we typed, and that is the clue most people miss.

    Address WordPress heldRequestWhat WordPress sentWhat Chrome printed
    A hostname that does not resolvewp-admin302 to that host’s login pageDNS_PROBE_FINISHED_NXDOMAIN
    An address with nothing listeningwp-admin302 to that address’s login pageERR_CONNECTION_REFUSED
    An https address on a server speaking only HTTPwp-admin302 to the https addressERR_CONNECTION_CLOSED
    A hostname that does not resolvewp-login.php200, with 15 references to the other hostPage returned; assets point away
    WordPress 7.1.5 lab: what a wrong home and site address did to the dashboard, measured 2026-11-25.

    The mechanism is short. In WordPress 7.1.5, auth_redirect() builds the login URL with wp_login_url(), which starts from the site address, and then redirects to it. Nothing in that path checks that the address can be reached.

    The Repair Without the Dashboard

    The repair does not need the dashboard. The WordPress wp-config documentation says that WP_HOME overrides the value in the wp_options table without changing the database. Add both lines to wp-config.php, above the line that loads wp-settings.php, which is where our lab file defined them:

    define( 'WP_HOME', 'https://www.example.com' );
    define( 'WP_SITEURL', 'https://www.example.com' );

    Core confirms the override: _config_wp_home() returns the constant whenever it is defined, and Settings, General disables its two address fields when the constants exist. Once wp-admin loads, correct the stored values, then remove the lines, because a constant left behind hides the mistake the next time the site moves.

    What Each Code Needs From Your Host

    Some rows in the table are yours and some are your host’s. A missing DNS answer is a registrar or DNS-host task, and your hosting plan cannot fix it. A wrong WordPress address is a file you control. The refused, timed-out, reset and empty-response rows describe what the server or its firewall did, and on a shared plan the web server, the ports and the firewall belong to the host.

    So the useful message to a host is not “my site is down”. It is the exact code, the output of the three commands and the time. A host that reads ERR_CONNECTION_REFUSED next to a good dig result knows to check the web server; one that reads ERR_CONNECTION_TIMED_OUT knows to check blocks. The same applies to a store, where an unreachable checkout is lost orders. If the cause turns out to be on the server side and you are weighing a move, our WooCommerce hosting and web hosting pages list the plans.

    Our other guides cover the neighbors of this error. When the browser does show a page, the 502 Bad Gateway guide and the database connection error guide explain the server-side messages. A certificate warning is a different failure, covered in Your connection is not private, and a loop between two addresses is covered in ERR_TOO_MANY_REDIRECTS.

    This Site Can’t Be Reached: Fix Checklist

    1. Read the code under the message and write it down. Do not troubleshoot from the heading alone.
    2. Try the site from mobile data. If it loads there, the fault is your network, VPN or device.
    3. Run dig +short for the domain. No output means fix DNS at your registrar or DNS host.
    4. Run curl -sI on the home page and on wp-admin. A status line means a server answered, so read the location header.
    5. If wp-admin redirects to a host that is not yours, set the two address constants in wp-config.php, then correct the stored values.
    6. When curl shows refused or times out, send your host the code, the dig output, the curl output and the time.
    7. For a server that answers while https fails, check that port 443 serves a certificate and that WordPress is not forcing https where it is not served.

    Frequently Asked Questions: This Site Can’t Be Reached

    How do I fix this site can’t be reached on a WordPress website in 2026?

    In practice, read the code printed under the message, because each code names a different layer. Then run dig and curl -I from your own machine: no address means a DNS fix at your registrar, a refused or timed-out connection means the server or its firewall, and a redirect to another hostname means a wrong WordPress address. Only after that is it worth clearing caches or restarting the router.

    Why does this site can’t be reached appear only on wp-admin and the WordPress login page?

    Specifically, WordPress sends wp-admin visitors to the login page built from its own site address, and in our lab that redirect pointed at a host that did not exist. The front end stayed up while the dashboard failed. Compare the host in the address bar after the redirect with your real domain, then correct WP_HOME and WP_SITEURL.

    Is this site can’t be reached a WordPress error or a browser error in 2026?

    In practice it is a browser error. Chrome prints it when it cannot get any response from the address in the bar, so WordPress is often not involved at all. WordPress can still cause it indirectly, by redirecting the browser to an address that cannot be reached.

    What is the difference between ERR_CONNECTION_REFUSED vs ERR_CONNECTION_TIMED_OUT for this site can’t be reached?

    Specifically, refused means something answered right away to say no program is listening on that address and port. Timed out means nothing answered, which usually points to a firewall silently dropping packets or a wrong address. In our lab the refused page appeared within the same second, while the timed-out attempt had not failed at 120 seconds and had failed by 127.

    Does this site can’t be reached mean my AHosting server is down?

    In fact, not necessarily. A server that is down usually produces a refused or timed-out code, but a missing DNS record, a typo in the address, a VPN or a wrong WordPress address produce the same heading. Run dig and curl -I first, and if both fail from two networks, send the exact code and the command output to AHosting support.

    Can a recent DNS change cause this site can’t be reached on a new WordPress site?

    Indeed, it can. Until your resolver learns the new address it may return no address at all, and Chrome then prints DNS_PROBE_FINISHED_NXDOMAIN. Moreover, resolvers cache answers for the lifetime the record states: the example.com answer we looked up carried a lifetime of 300 seconds. Check a public resolver, and wait out the old lifetime before changing anything else.

    What should I send AHosting support when this site can’t be reached after a WordPress move?

    Typically, the useful message holds four things: the exact code under the message, the output of dig +short for the domain, the output of curl -sI for the home page and for wp-admin, and the time you tried. With those, the reader can tell in one pass whether to look at DNS, the server or the WordPress address.

    Can a VPN or antivirus be the reason this site can’t be reached in 2026?

    In practice, yes, but only when the site loads from another network. A VPN or a security suite that filters traffic can drop or reset connections on your side alone. Therefore test from mobile data before you touch the server, and treat a site that fails on every network as the server’s problem.

    Should I use an online DNS checker vs the command line when this site can’t be reached?

    Overall, use both, because they answer different questions. The command line asks your own resolver, which is the one your browser used. An online lookup asks a public resolver, so a mismatch shows that your local cache is stale or that only some resolvers have the new record.

    Can I fix a wrong WP_HOME on AHosting with cPanel File Manager when wp-admin will not load?

    Indeed, because the fix lives in a file rather than in the dashboard. Open wp-config.php in the File Manager editor, add the two address lines above the line that loads wp-settings.php, and save. Keep a copy of the file first, and remove the lines again once the database values are correct.

    November 26, 2026
  • Refused to Display in a Frame in WordPress: Who Sent the Header and How to Allow One Site (2026)

    Refused to Display in a Frame in WordPress: Who Sent the Header and How to Allow One Site (2026)

    • What Refused to Display in a Frame Means in WordPress
      • Where the Message Prints
    • Refused to Display in a Frame: Which Side Is Saying No?
    • What WordPress Sends, and on Which Pages
    • How Chrome 158 Decided in Our Refused to Display in a Frame Lab
    • Why www, a Subdomain or http Still Counts as Another Site
    • How to Allow One Named Site to Frame WordPress Pages
    • When the Header Does Not Come From WordPress
    • Refused to Display in a Frame: Fix Checklist
    • Frequently Asked Questions: Refused to Display in a Frame
      • What does refused to display in a frame mean, and what are the X-Frame-Options values in 2026?
      • Refused to display in a frame: X-Frame-Options vs frame-ancestors, which one wins in Chrome?
      • Why does refused to display in a frame appear on my WordPress login page in 2026?
      • Why is refused to display in a frame still showing after I removed X-Frame-Options from WordPress?
      • Does SAMEORIGIN treat www vs the bare domain as the same site in 2026?
      • Which WordPress hooks send the headers behind refused to display in a frame, and at what priority?
      • Does AHosting send X-Frame-Options on its own pages, and what did we measure in 2026?
      • How do I allow one partner site past refused to display in a frame on an AHosting WordPress plan?
      • How can I check which headers my AHosting site returns before embedding it in 2026?
      • Is the X-Frame-Options header deprecated, and do browsers still support ALLOW-FROM?
    TL;DR

    Refused to display in a frame means a browser would not draw a page inside an iframe because that page’s response said no. The message prints in the console of the embedding page, and the blocked site logs nothing. WordPress core sends X-Frame-Options SAMEORIGIN plus a frame-ancestors policy on wp-login.php and wp-admin only. In our Chrome 158 lab, removing just the old header left the login page blocked, while a frame-ancestors header naming one site loaded it.

    Listen: what the error means, where it prints and which header decides. By Matt Chrust, Director of Business Development, AHosting.

    What Refused to Display in a Frame Means in WordPress

    Refused to display in a frame means a browser fetched a page for an iframe and then declined to draw it, because the response carried a header forbidding that embedding. The full Chrome line reads Refused to display ‘URL’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’. Nothing is broken on the server. The page loaded, and the browser obeyed the page’s own instruction.

    Two headers can carry that instruction. X-Frame-Options is the older one and takes DENY or SAMEORIGIN. The Content-Security-Policy frame-ancestors directive is the newer one and can name the sites allowed to embed the page. MDN’s X-Frame-Options reference calls the ALLOW-FROM value obsolete and points to frame-ancestors instead. Both exist to stop clickjacking, where an attacker frames your login page invisibly under their own page.

    Where the Message Prints

    The line appears in the DevTools console of the embedding page, not on the site that said no. If you own site A and embed site B, you see the error on A while B logs nothing. That is why a search of your server logs finds nothing: the request ended in a 200. The fix belongs to whoever controls the headers of B, which is you only when you run both.

    Refused to Display in a Frame: Which Side Is Saying No?

    Read the headers of the framed page, not the embedding page. From a terminal, swap in the framed URL:

    curl -sI https://example.com/page/ | grep -i -E "x-frame-options|content-security-policy"

    Read them from a 200 response. Our own curl of a wp-login.php URL answered 403 on 2026-11-24, so we did not treat its headers as the login page’s. Reading the log behind a 403 explains why an error page cannot vouch for the real one. If you would rather not use a terminal, securityheaders.com analyzes the response headers of a public URL.

    Then check for frame-ancestors first. When the response contains that policy, the browser ignores X-Frame-Options. The Chromium source for the check, ancestor_throttle.cc, returns early in that case (lines 263 to 267).

    A similar error comes from the other direction. A frame-src directive on the embedding page limits which sites that page may load into frames, while frame-ancestors on the framed page limits who may embed it. It is also not CORS. Fonts and fetch calls fail on Access-Control-Allow-Origin, covered in Blocked by CORS Policy in WordPress, and a frame has its own pair of headers. A store that embeds a booking or support page from another site meets the same rule, and the framed page’s owner decides, even when the store sits on a WooCommerce hosting plan.

    What WordPress Sends, and on Which Pages

    Core has one function for this. send_frame_options_header() in wp-includes/functions.php sends X-Frame-Options: SAMEORIGIN and Content-Security-Policy: frame-ancestors ‘self’ together, at lines 7282 to 7287 in WordPress 7.1.5, and only if headers have not been sent yet. Core hooks it to admin_init (wp-admin/includes/admin-filters.php, line 47) and login_init (wp-includes/default-filters.php, line 398), both at priority 10. The Customizer adds its own filter for the preview in class-wp-customize-manager.php (lines 1970 to 1980) that sets the same pair.

    We probed a real WordPress 7.1.5 install on PHP 8.5.10 with curl and a logged-in cookie.

    URLX-Frame-Optionsframe-ancestors policyWho WordPress lets frame it
    Home page and single postnonenoneNot restricted by WordPress
    REST root and embed URLnonenoneNot restricted by WordPress
    admin-ajax.phpnonenoneNot restricted by WordPress
    wp-login.phpSAMEORIGIN‘self’Same origin only
    wp-admin (logged in)SAMEORIGIN‘self’Same origin only
    Frame headers sent by stock WordPress 7.1.5, lab probe, 2026-11-24

    So the front end is not WordPress’s doing. When a public page refuses to be framed, the header comes from the server, a security plugin or a CDN. A curl on 2026-11-24 showed www.ahosting.net answering its home page and its blog with X-Frame-Options SAMEORIGIN and a policy ending in frame-ancestors ‘self’, although core sends nothing on those pages.

    How Chrome 158 Decided in Our Refused to Display in a Frame Lab

    We framed one page from a different origin eleven ways in headless Chrome 158 (nginx 1.31.6, one machine). Five setups loaded and six were blocked.

    How the browser decides to refuse a frame Four boxes in a row: the embedding page asks for a URL in an iframe, the framed server answers 200 with headers, the browser checks for a frame-ancestors policy, and the browser renders or refuses. Below the third box two branches: if frame-ancestors is present it decides and X-Frame-Options is ignored; if it is absent X-Frame-Options decides. A note at the bottom says the refusal message is printed in the console of the embedding page. One response, one verdict, printed on the other site Embedding page asks for the URL Framed server answers 200 plus headers Browser reads the response headers Render or refuse no request fails frame-ancestors present It decides, checked against every parent. X-Frame-Options is ignored. No frame-ancestors X-Frame-Options decides: DENY, SAMEORIGIN, or ignored. The refusal message appears in the console of the EMBEDDING page, not the framed site.
    Headers on the framed pageResultConsole line in the embedding page
    No frame headersLoadsnone
    X-Frame-Options: DENYBlockedRefused to display … ‘deny’
    X-Frame-Options: SAMEORIGINBlockedRefused to display … ‘sameorigin’
    X-Frame-Options: ALLOW-FROM the parentLoadsInvalid header … not a recognized directive. The header will be ignored
    X-Frame-Options: ALLOWALLLoadsnone
    frame-ancestors ‘self’BlockedFraming … violates the following Content Security Policy directive
    frame-ancestors naming the parentLoadsnone
    DENY plus frame-ancestors naming the parentLoadsnone
    WordPress pair: SAMEORIGIN plus frame-ancestors selfBlockedFraming … violates … frame-ancestors (CSP wording only)
    Two X-Frame-Options headers: SAMEORIGIN and ALLOWALLBlocked… multiple ‘X-Frame-Options’ headers with conflicting values … Falling back to ‘deny’
    WordPress pair plus a second policy naming the parentBlockedFraming … violates … frame-ancestors (policies intersect)
    Chrome 158 frame header outcome table, 11 setups, cross-origin parent, lab 2026-11-24
    • frame-ancestors beats X-Frame-Options. A page sending DENY and naming the parent in frame-ancestors loaded.
    • ALLOW-FROM does nothing. The page loaded and the console said the directive is not recognized, which matches MDN.
    • Duplicate headers fall back to deny. The conflict message is in the Chromium source at lines 202 to 204.
    • Two policies intersect. A self-only policy plus one naming the parent still blocked.
    • The WordPress pair prints the policy wording. On a stock login page Chrome 158 printed the Framing line, not the Refused to display line, so search for both.

    Why www, a Subdomain or http Still Counts as Another Site

    SAMEORIGIN and a self-only policy compare origins: scheme, host and port. In our lab the parent sat on sub.parent.localhost and the framed page on parent.localhost. All three header setups we tried were blocked, including a policy that named the parent host only. By the same rule www.example.com framing example.com is refused, and so is http framing https. The Chromium source checks frame-ancestors against every parent (line 368), so in nested frames one disallowed ancestor stops the load.

    It also explains the Customizer. By the header’s own rule the preview works only when wp-admin and the front end share one origin, because core sets the same SAMEORIGIN pair for it.

    How to Allow One Named Site to Frame WordPress Pages

    Allow the one site you trust and nothing else. X-Frame-Options can no longer name a site, so the allowlist lives in frame-ancestors, and the old header has to go so the two never disagree.

    Removing only X-Frame-Options does not work. In our lab, with that header gone and core’s policy still in place, Chrome kept blocking the login page. Removing core’s hooks needs care too. The login hook is registered before init, but the admin hook is registered later, so a remove_action at init cleared wp-login.php and left wp-admin with both headers. The reliable pattern replaces the headers after core has sent them, at priority 11:

    <?php
    /* wp-content/mu-plugins/allow-one-frame-parent.php */
    $allow_one_parent = function () {
        header_remove( 'X-Frame-Options' );
        header( "Content-Security-Policy: frame-ancestors 'self' https://partner.example" );
    };
    add_action( 'login_init', $allow_one_parent, 11 );
    add_action( 'admin_init', $allow_one_parent, 11 );

    In the lab, Chrome loaded the login page inside a parent on a different origin named in the policy, and wp-admin carried the same single header. Replace https://partner.example with the exact scheme and host of the embedding site, never a wildcard. A login form that any page may frame is a clickjacking target. If only wp-login.php must be framed, register the closure on login_init alone and keep the dashboard locked. The header() call only works before output starts, so if it fails see Headers Already Sent in WordPress.

    Use the decoder to turn the console line you see into the next step.

    AHosting Frame Error Decoder

    See WordPress hosting plans

    When the Header Does Not Come From WordPress

    If a front-end page refuses to be framed, core is not the sender. Check the server configuration or .htaccess, a security plugin’s header setting and any CDN rule, and change the header where it is set. A PHP snippet cannot remove a header a CDN adds after PHP has finished. MDN shows the Apache and nginx lines for X-Frame-Options. We did not test Apache or LiteSpeed here, so confirm with curl after any change. For the wider picture of what the server layer does, read WordPress Hosting Security 2026.

    Two things never work. A meta http-equiv tag for X-Frame-Options has no effect, and frame-ancestors is not supported in a meta element either, both per MDN. A static page or another app on the same account follows the same rule, so a site on a web hosting plan needs the header set in its own server configuration.

    Refused to Display in a Frame: Fix Checklist

    1. Copy the exact console line from the embedding page.
    2. Run curl -sI on the framed URL and read X-Frame-Options and Content-Security-Policy from a 200 response.
    3. If a frame-ancestors policy is present, ignore X-Frame-Options and read the list.
    4. Compare origins exactly: scheme, host and port.
    5. Change the header where it is set. For the WordPress login and admin, replace both headers at priority 11.
    6. Reload the embedding page and run the curl again to confirm.

    Frequently Asked Questions: Refused to Display in a Frame

    What does refused to display in a frame mean, and what are the X-Frame-Options values in 2026?

    Specifically, it means the browser loaded a page for an iframe and then declined to draw it because that page sent a header forbidding the embedding. X-Frame-Options accepts DENY, which blocks every parent, and SAMEORIGIN, which allows only the same origin. ALLOW-FROM is obsolete and modern browsers ignore it. The message prints in the console of the embedding page, and the blocked site logs nothing, as the decision table above shows.

    Refused to display in a frame: X-Frame-Options vs frame-ancestors, which one wins in Chrome?

    In practice, frame-ancestors wins. In our Chrome 158 lab a page that sent X-Frame-Options DENY together with a frame-ancestors list naming the parent loaded normally, because the browser ignores the older header once a frame-ancestors policy is present. The Chromium source returns early for that case. Send one header, not both.

    Why does refused to display in a frame appear on my WordPress login page in 2026?

    Typically because WordPress core sends X-Frame-Options SAMEORIGIN and a frame-ancestors policy limited to the site itself on wp-login.php and on wp-admin. In WordPress 7.1.5 both come from one function that runs on the login and admin hooks. Any page on another origin that frames the login form is refused, which is the clickjacking protection working as designed.

    Why is refused to display in a frame still showing after I removed X-Frame-Options from WordPress?

    Indeed, removing only that header changes nothing in Chrome. WordPress sends a frame-ancestors policy from the same function, and in our lab the login page stayed blocked with only that policy left. Replace both headers, or remove the core hooks at the right moment, as the section on allowing one named site shows.

    Does SAMEORIGIN treat www vs the bare domain as the same site in 2026?

    Specifically, no. Origin means scheme, host and port, so www.example.com, example.com and a subdomain are three different origins. In our lab a page on a subdomain was refused when it framed its parent, under both SAMEORIGIN and a self-only frame-ancestors policy. The same applies to http against https.

    Which WordPress hooks send the headers behind refused to display in a frame, and at what priority?

    Specifically, core runs send_frame_options_header on admin_init and on login_init, both at priority 10 in WordPress 7.1.5. The Customizer adds its own filter that sets the same pair for the preview. Core sends nothing on front-end pages, so a public page that refuses to be framed is getting its header from the server, a plugin or a CDN.

    Does AHosting send X-Frame-Options on its own pages, and what did we measure in 2026?

    Overall, yes. A curl check on 2026-11-24 showed the AHosting home page and the blog home both answering with X-Frame-Options SAMEORIGIN and a content security policy ending in a frame-ancestors rule for the site itself. WordPress core sends nothing on those pages, so the headers are set outside core. Other sites cannot frame those pages.

    How do I allow one partner site past refused to display in a frame on an AHosting WordPress plan?

    In practice, replace both headers on the login and admin hooks with one frame-ancestors policy that names the partner origin, using a small must-use plugin. That changes only what WordPress sends. A header added by the server or the CDN is a separate layer and has to be changed where it is set. Test with curl after the change.

    How can I check which headers my AHosting site returns before embedding it in 2026?

    Fortunately, one curl command shows them. Run curl with the head option against the exact URL you plan to frame, then look at X-Frame-Options and Content-Security-Policy on a 200 response, not on an error page. The browser console of the embedding page then confirms which rule fired.

    Is the X-Frame-Options header deprecated, and do browsers still support ALLOW-FROM?

    In fact, DENY and SAMEORIGIN still work, but frame-ancestors is the replacement and ALLOW-FROM is obsolete. In our Chrome 158 lab a page sending ALLOW-FROM with the parent origin loaded, and the console said the value is not a recognized directive and the header would be ignored. To allow one named site, use frame-ancestors.

    November 25, 2026
  • Could Not Instantiate Mail Function in WordPress: What the Error Hides and How to Log It (2026)

    Could Not Instantiate Mail Function in WordPress: What the Error Hides and How to Log It (2026)

    • What Could Not Instantiate Mail Function Means in WordPress
    • What a Lab Found Behind Could Not Instantiate Mail Function
      • Three failures, one sentence
      • Two failures WordPress hides
    • Why Could Not Instantiate Mail Function Appears on Shared Hosting
      • When mail() returns false
      • When mail() returns true and nothing arrives
    • Log the Real Reason Behind Could Not Instantiate Mail Function
    • Fix Could Not Instantiate Mail Function by Moving to SMTP
    • Frequently Asked Questions: Could Not Instantiate Mail Function
      • Why is my WordPress email not working with the could not instantiate mail function error in 2026?
      • Does the could not instantiate mail function error mean my host blocks email in 2026?
      • Does AHosting include a dedicated IP on WordPress plans, and does it fix could not instantiate mail function?
      • SMTP vs PHP mail(): which fixes could not instantiate mail function more reliably on WordPress?
      • Sendmail exit code 127 vs 67: what does each tell you about could not instantiate mail function?
      • What should I send AHosting support when WordPress shows could not instantiate mail function in 2026?
      • Can AHosting WooCommerce hosting stop order emails failing with could not instantiate mail function?
      • Does PHP 8.5 change what WordPress shows for could not instantiate mail function in 2026?
      • Why does wp_mail return true, but the email never reaches the inbox?
      • Will a missing attachment or a bad address trigger could not instantiate mail function in WordPress?
    TL;DR

    Could not instantiate mail function means the mail() call in PHP returned false. WordPress prints the same sentence whether sendmail refused the message, was missing or exited with an error. In our lab a small mu-plugin recovered the exit code on PHP 8.5, and moving to SMTP turned the sentence into the server’s own reason.

    Listen: what the error sentence reports and which exit code to look for. By Matt Chrust, Director of Business Development, AHosting.

    What Could Not Instantiate Mail Function Means in WordPress

    The WordPress error could not instantiate mail function means the mail() call in PHP returned false. WordPress hands the message to PHPMailer, PHPMailer calls mail() once, and when that call fails PHPMailer throws this sentence. It names no cause, no recipient and no server. WordPress 7.1.5 ships PHPMailer 7.1.1, and that is all it tells you, whatever actually went wrong.

    The path is short. wp_mail() in pluggable.php selects the mail transport at line 505. PHPMailer then runs @mail() at PHPMailer.php:894. When that returns false, line 2150 throws the exception, and pluggable.php:665 fires the wp_mail_failed action and returns false. The @ in front of mail() matters later in this guide.

    How wp_mail() reaches the error sentence Four boxes in a row: wp_mail in WordPress, PHPMailer mail transport, the mail function in PHP, and the sendmail command. From the sendmail box two outcomes branch. Exit code zero returns true, which means accepted and not delivered. Any other exit code returns false and PHPMailer throws the sentence Could not instantiate mail function. One call, one exit code, one sentence wp_mail() PHPMailer isMail() @mail() the @ hides the warning sendmail command stderr is discarded exit code Exit 0: wp_mail() returns true Accepted for delivery. Not the same as delivered. Any other exit: wp_mail() returns false Could not instantiate mail function.

    What a Lab Found Behind Could Not Instantiate Mail Function

    I ran WordPress 7.1.5 on PHP 8.5.10 on one Mac, put a stub where the server’s sendmail command would be, and broke it eight ways. This was not an AHosting server, and it says nothing about Exim, cPanel or CloudLinux. It shows what WordPress and PHPMailer do with each failure.

    Lab setupwp_mail() returnsWhat WordPress shows
    Stub accepts the messagetrueNothing
    Stub exits 67 after printing a 550 linefalseCould not instantiate mail function.
    sendmail_path is /usr/bin/falsefalseCould not instantiate mail function.
    sendmail_path points at a missing filefalseCould not instantiate mail function.
    mail() is listed in disable_functionsFatal errorThere has been a critical error on this website.
    From header is not an addressfalseInvalid address: (From): not an address
    Recipient is not-an-emailfalseYou must provide at least one recipient email address.
    Attachment file does not existtrueNothing, and the attachment is dropped
    wp_mail() Failure Ladder: eight lab setups on WordPress 7.1.5 and PHP 8.5.10

    Three failures, one sentence

    Rows two, three and four fail for three different reasons and print the same sentence. The PHP manual says mail() returns true only when the message was accepted for delivery, and nothing the sendmail command prints on stderr comes back to WordPress. In row two the stub printed a 550 line, and that line appears nowhere in WordPress.

    Row five is the exception. With mail() disabled, PHP 8.5.10 removes the function, so PHPMailer dies with an uncaught error and you see the critical-error page, never the mail sentence. If that is your screen, the white screen of death guide is the better place to start.

    Two failures WordPress hides

    Rows seven and eight fail quietly. WordPress skips a bad recipient at pluggable.php:498 and a missing attachment at line 565, each inside a try block that simply continues. A missing attachment still returns true, and a bad address surfaces as the recipient sentence rather than naming the address.

    Why Could Not Instantiate Mail Function Appears on Shared Hosting

    The sentence reports one event: the sendmail-compatible command that PHP starts exited with an error. PHP’s default for that command is /usr/sbin/sendmail -t -i, where -t takes recipients from the headers and -i stops a lone dot from ending the message.

    When mail() returns false

    Anything that makes that command exit non-zero lands here: a wrong sendmail_path, a mail server that refused the message, or a command that cannot start. WordPress cannot tell which. The reason sits in the mail log on the host, which a customer cannot read from inside WordPress.

    One cause worth checking is the sender. wp_mail() builds a default From header from your site host, yet in the lab PHPMailer passed no -f flag, only -t -i. The Exim documentation says that without -f the sender of a local message becomes the caller’s login name at the default domain. A mail server that compares the two can reject the mismatch. I have not measured that on an AHosting server, so treat it as the first thing to ask about, not a finding.

    When mail() returns true and nothing arrives

    True means accepted, not delivered. In the lab, the mail.log setting wrote an identical line for the accepted send and the rejected one, so it proves PHP called mail() and nothing more. If the message left the server and then reached a spam folder, that is a reputation problem, and our guide to WordPress email going to spam covers it.

    Log the Real Reason Behind Could Not Instantiate Mail Function

    A small mu-plugin records both halves of the story. The first hook logs the WordPress message and the recipient through the wp_mail_failed action. The second catches the warning that PHP 8.5 raises when sendmail exits with an error. PHPMailer silences that warning with the @ operator, so an ordinary error log never shows it, yet a handler still receives it.

    <?php
    /**
     * Plugin Name: Mail failure log
     */
    add_action( 'wp_mail_failed', function ( $error ) {
    	$data = $error->get_error_data();
    	$to   = isset( $data['to'] ) ? implode( ', ', (array) $data['to'] ) : 'unknown';
    	error_log( 'wp_mail_failed: ' . $error->get_error_message() . ' (to: ' . $to . ')' );
    } );
    
    set_error_handler( function ( $errno, $message ) {
    	if ( 0 === strpos( $message, 'mail():' ) ) {
    		error_log( 'PHP warning from mail(): ' . $message );
    	}
    	return false;
    }, E_WARNING );

    In the lab, a failed send wrote two lines: the PHP warning with the exit code, then the wp_mail_failed line with the sentence and the recipient. A successful send wrote nothing. With the plugin removed, the error log stayed empty. The PHP manual lists that warning as new in 8.5.0, so on older PHP only the second line appears.

    Read the code like this. 127 is the shell’s code for command not found, so sendmail_path points at nothing. 1 is a generic failure. A code from 64 to 78 is a sysexits code, and 67 means the user specified did not exist, so the command reported a problem with the recipient. Send your host the time, the exit code and the recipient domain, and they can find the matching log line.

    AHosting Mail Error Decoder

    See WordPress plans with a dedicated IP

    Fix Could Not Instantiate Mail Function by Moving to SMTP

    Authenticated SMTP replaces the sendmail hand-off with a conversation, and the other server’s answer comes back as text. I tested that with a raw SMTP stub behind the phpmailer_init action.

    Stub behaviorwp_mail() returnsWhat WordPress shows
    Nothing listens on the portfalseSMTP Error: Could not connect to SMTP host. Failed to connect to server
    Server answers AUTH with 535falseSMTP Error: Could not authenticate.
    Server answers MAIL FROM with 550falseThe following From address failed: (the sender address) : MAIL FROM command failed,Sender address rejected: not owned by user
    Server accepts everythingtrueNothing
    SMTP Failure Ladder: four lab setups, stub reply text in the third row

    The third row is the useful one, because the message carries the server’s own reason. RFC 5321 defines 550 as mailbox unavailable, including a command rejected for policy reasons. Set the From address to a mailbox on the domain you authenticate against, then retest.

    1. Add the mu-plugin above and trigger one send, then note the exit code.
    2. Create a mailbox for the sending address in cPanel. AHosting’s web hosting plans list cPanel with IMAP, SMTP and Webmail.
    3. Point an SMTP plugin at that mailbox with its host, port and password, and use the same mailbox as the From address.
    4. Send a test and read the message against the table above.

    No plan change clears a sendmail refusal by itself, and the steps above work on any host. If you also want the sending address on an IP that is not shared with unrelated accounts, every AHosting WordPress plan includes one, and the dedicated IP guide explains what it does and does not change. A shop that sends order receipts through wp_mail() follows the same steps on WooCommerce hosting.

    Frequently Asked Questions: Could Not Instantiate Mail Function

    Why is my WordPress email not working with the could not instantiate mail function error in 2026?

    Specifically, the message means the mail() function in PHP returned false, so the sendmail command on the server refused the message or never started. WordPress 7.1.5 prints the same sentence for each of those cases. Log the exit code with the mu-plugin above to see which one happened.

    Does the could not instantiate mail function error mean my host blocks email in 2026?

    In practice, a host that blocks mail() is only one cause. A wrong sendmail_path, a refused sender or a command that cannot start produce the identical sentence. Only the exit code and the mail log on the host separate them, so ask for both before blaming the plan.

    Does AHosting include a dedicated IP on WordPress plans, and does it fix could not instantiate mail function?

    In other words, yes to the first part and no to the second. Every AHosting WordPress plan page lists a dedicated IP. That IP affects reputation after a message leaves, while this error appears before it leaves, so the log and the sender still need checking.

    SMTP vs PHP mail(): which fixes could not instantiate mail function more reliably on WordPress?

    Therefore SMTP is the better first move, because the other server answers in words. In our lab the SMTP path returned could not authenticate, could not connect, or the sender rejection text. The mail() path returned one sentence for every failure.

    Sendmail exit code 127 vs 67: what does each tell you about could not instantiate mail function?

    Specifically, 127 is the shell code for command not found, so sendmail_path points at nothing. A code of 67 is the sysexits code for a user that does not exist, so the command reported a problem with the recipient. Both give the same WordPress sentence.

    What should I send AHosting support when WordPress shows could not instantiate mail function in 2026?

    Specifically, send the time of the failed send, the exit code from the log, the recipient domain and the From address. Those four items let support find the matching mail log line. Add the exact sentence WordPress showed, copied as text.

    Can AHosting WooCommerce hosting stop order emails failing with could not instantiate mail function?

    In practice, no plan change clears this error by itself. WooCommerce sends order emails through the same wp_mail() call, so the same log and the same checks apply. Fix the sender or the transport first, then retest with a real order.

    Does PHP 8.5 change what WordPress shows for could not instantiate mail function in 2026?

    Notably, PHP 8.5 raises a warning that carries the sendmail exit code, but PHPMailer silences it with an at sign, so WordPress still shows the same sentence. A small error handler restores the code. On older PHP versions that warning does not exist.

    Why does wp_mail return true, but the email never reaches the inbox?

    However, true only means the server accepted the message for delivery. The PHP manual says that does not mean it reaches the destination. Check the spam folder, then ask the host for the mail log entry at that time.

    Will a missing attachment or a bad address trigger could not instantiate mail function in WordPress?

    In contrast, neither does. WordPress skips a missing attachment and still returns true. It skips an unparseable recipient and reports that you must provide at least one recipient email address. Both are separate from this error.

    November 24, 2026
  • Blocked by CORS Policy in WordPress: Why Fonts Fail and How to Fix Them (2026)

    Blocked by CORS Policy in WordPress: Why Fonts Fail and How to Fix Them (2026)

    • Blocked by CORS Policy: What the Font Error Means
    • Why a Font Is Blocked by CORS Policy When an Image Loads Fine
    • Nine Setups Blocked or Allowed: Our Lab Results
      • Three Findings From Our Blocked by CORS Policy Test
    • Fix a Blocked Font: Read the Reason First
      • A Font Blocked by CORS Policy Because the Header Is Missing
      • A Font Blocked by CORS Policy Because the Header Names the Wrong Origin
      • A Font Blocked by CORS Policy That Is Really a 404 or 500
      • A Redirect Behind the Blocked by CORS Policy Line
    • Where to Add the Header for a Font Blocked by CORS Policy
    • Triage a Font Blocked by CORS Policy in Two Questions
    • The WWW Mismatch That Gets a Font Blocked by CORS Policy
    • A Cached Font Still Blocked by CORS Policy After the Fix
    • What WordPress Sends for REST and admin-ajax, and Why Fonts Differ
    • When a Font Blocked by CORS Policy Points to a Bigger Plan
    • Frequently Asked Questions: Blocked by CORS Policy
      • How do you fix a font blocked by CORS policy on a WordPress site in 2026?
      • Is Access-Control-Allow-Origin * vs a single origin the safer choice for a font blocked by CORS policy?
      • Does the AHosting plan I choose change whether a font is blocked by CORS policy in 2026?
      • Why does a WordPress font show a CORS error when the real problem is a 404 or 500 response?
      • What should I send AHosting support when a font is still blocked by CORS policy after I add the header?
      • Does Vary: Origin matter when a font is blocked by CORS policy behind a cache or CDN?
      • Can a www vs non-www mismatch leave a font blocked by CORS policy even on one domain in 2026?
      • Why does an image from another host load while a font from that host is blocked?
      • Does WordPress core send an Access-Control-Allow-Origin header for font files like it does for the REST API?
      • What is the simplest way to keep a font from being blocked by CORS policy on an AHosting WordPress site?
    TL;DR

    A font blocked by CORS policy means the browser asked another origin for the font file and the response did not carry an Access-Control-Allow-Origin header that matches the page. In our Chrome 158 lab, 6 of 9 font setups failed, and a missing file or a server error printed the same console line as a missing header. Read the reason, run curl -I on the font URL, then add the header on the host that serves the font.

    Listen: what the console reason means and which check to run first. By Matt Chrust, Director of Business Development, AHosting.

    Blocked by CORS Policy: What the Font Error Means

    When Chrome reports that a font has been blocked by CORS policy, it asked another origin for a font file and the answer did not include permission. The console line names the font URL, the page origin and a reason. The reason is the part that tells you what to fix. Meanwhile the page falls back to a default font, so the site looks wrong but keeps working.

    An origin is the scheme, host and port taken together, so the apex host and the www host of one domain are two origins. The CSS Fonts specification says a font is fetched with CORS mode set to cors, and adds a note that fonts are not loaded cross-origin unless the author permits it with the Access-Control-Allow-Origin header. That one rule is why fonts and icon fonts fail after a CDN, a subdomain or a www change.

    We reproduced the error on purpose instead of repeating advice. Everything below comes from nine font setups in Chrome 158 against nginx 1.31.6 on one Mac. It is a lab, not an AHosting server.

    Why a Font Is Blocked by CORS Policy When an Image Loads Fine

    A page can display an image from any host, yet it cannot read a font from just any host. We tested both against one cross-origin URL with no header on the response. A plain img tag loaded the file. The same URL requested with the crossorigin attribute set to anonymous failed with a CORS line that read Access to image instead of Access to font.

    Image request versus font request Two lanes. In the top lane an img tag requests a file from another host, the response has no Access-Control-Allow-Origin header, and the image is shown. In the bottom lane a font request is sent in CORS mode with an Origin header, the response has no matching header, and the browser blocks the font. Same cross-origin file, no header on the response Plain img tag Request, no CORS 200, no header Image is shown Font in CORS mode Request with Origin 200, no header Font is blocked

    WordPress is not in this conversation. A font is a static file, so the web server answers without starting PHP. In the three core files we read, the only code that sends an Access-Control-Allow-Origin header serves the REST API and admin-ajax.php. Both run PHP, and a font request never does, so a PHP filter cannot fix a blocked font.

    Nine Setups Blocked or Allowed: Our Lab Results

    We loaded one small font nine ways and recorded every console line. Three setups loaded and six failed, and five of the six printed a CORS line. The table is the AHosting CORS Font Decoder, and the right column is the one to match against your own console.

    SetupWhat the server sentResultWhat Chrome printed
    Font on the same origin as the page200, no header neededLoadedNothing
    Font on www while the page is on the apex host200, no headerBlockedNo Access-Control-Allow-Origin header is present
    Font on a CDN host, header set to *200, header *LoadedNothing
    Font on a CDN host, header set to the exact page origin200, exact originLoadedNothing
    CDN host, header names the www origin instead200, wrong valueBlockedHeader has a value that is not equal to the supplied origin
    CDN host, file missing, header added without always404, no headerBlockedMissing-header line, though the 404 is the cause
    CDN host, file missing, header added with always404, header *BlockedNo CORS line; the 404 is the cause
    CDN host answers with a server error500, no headerBlockedMissing-header line, though the 500 is the cause
    Same-origin URL that redirects to a host without the header301, then 200 with no headerBlockedMissing-header line plus redirected from
    AHosting CORS Font Decoder: nine font setups tested in Chrome 158 against nginx 1.31.6 on one Mac, 21 November 2026.

    Three Findings From Our Blocked by CORS Policy Test

    Three findings matter more than the rest. A missing file and a server error print the same line as a missing header, so the console alone cannot tell you which one you have. Adding the header to the 404 made the CORS line vanish, which proves the failure was the 404. And the redirect line names the original URL, which is your clue that the final host is the one to fix.

    Limits: static files, one browser, one server, localhost names. No Apache, LiteSpeed, Firefox, Safari, CDN or credentialed requests were tested.

    Fix a Blocked Font: Read the Reason First

    Four reasons produced the six failures, and each has a different fix.

    A Font Blocked by CORS Policy Because the Header Is Missing

    Confirm it from a terminal instead of the browser. Run curl -sI -H "Origin: https://your-site.example" https://cdn.example/font.woff2 with your own page origin and font URL, and look for an access-control-allow-origin line. If it is absent, add the header on the host that serves the font.

    A Font Blocked by CORS Policy Because the Header Names the Wrong Origin

    Here the header exists but names a different origin. In our lab it named the www host while the page sat on the apex host, and Chrome said the value was not equal to the supplied origin. The value must match the page scheme, host and port exactly, or you can send * for a public font.

    A Font Blocked by CORS Policy That Is Really a 404 or 500

    Check the status first. A 404 or 500 without the header prints the same line as a missing header, so editing headers changes nothing. In nginx, add_header skips error responses unless you add always, which is why our 404 with always printed no CORS line at all. Fix the URL or the server error.

    A Redirect Behind the Blocked by CORS Policy Line

    When Chrome adds the words redirected from, follow the redirect to its last host. That host needs the header, or the stylesheet should point straight at the final URL. A plugin that rewrites asset URLs to a CDN can add this hop.

    Where to Add the Header for a Font Blocked by CORS Policy

    Add the header on the server that serves the font, never on the page that asks for it. The MDN reference for the missing-header reason shows the Apache form, Header set Access-Control-Allow-Origin 'https://example.com' in an .htaccess file or the server configuration, and the nginx form with always on the end. We ran only the nginx form. We did not run the Apache directive, so test it with curl after you add it.

    If the font lives in your own hosting account, the .htaccess file in that site folder is the file the Apache example targets. On a CDN, the setting is in its dashboard.

    Header valueFont loaded in our labSafe behind a cacheNote
    *YesYes, one value for every originMDN limits the wildcard to public resources, and a font file is public by design
    One exact originYes, and a wrong origin failedYes while one site asksMust match scheme, host and port
    Reflect the request OriginYesOnly with Vary: OriginNeeded when several sites share one font host
    Three ways to set Access-Control-Allow-Origin on a font, from our lab and MDN guidance.

    Triage a Font Blocked by CORS Policy in Two Questions

    Answer from your own console and curl output. The tool cannot test your site.

    CORS Font Triage

    See what a hosting plan includes

    The WWW Mismatch That Gets a Font Blocked by CORS Policy

    A page on the apex host that loads a font from the www host is a cross-origin request, and our lab blocked it. A stylesheet or theme setting that still holds the old host after a move can do exactly this.

    Pick one canonical host and make the other redirect to it. In WordPress, Settings then General holds the WordPress Address and the Site Address, and both should name the same host. Our guide to the too many redirects error covers what happens when those settings and the redirect rules disagree. An http font on an https page is a different error, covered in our mixed content warning guide.

    A Cached Font Still Blocked by CORS Policy After the Fix

    If curl shows the header and Chrome still blocks the font, suspect a cache holding an older response. We tested a cache in front of a server that echoes the request Origin. Without a Vary header, the first origin to ask got a miss, and the second origin got a hit that still carried the first origin value. With Vary: Origin the second origin got its own copy.

    The Smashing Magazine explainer on the Vary header describes the mechanism: a cache treats Vary as a validator, and a request that does not satisfy it counts as a miss. After any header change, purge each cache layer, then test in a private window. Our notes on LiteSpeed Cache and Cloudflare explain how those layers stack.

    What WordPress Sends for REST and admin-ajax, and Why Fonts Differ

    WordPress does send CORS headers, just not for files. In WordPress 7.1.5, send_origin_headers() at line 515 of http.php allows only the host of the admin and home URLs, with no port, and admin-ajax.php calls it at line 25. The send_origin_headers reference documents it. The REST API takes a different route: rest_send_cors_headers() in rest-api.php echoes whatever Origin the request carries and adds Allow-Credentials true and Vary: Origin.

    That is core choosing for its own endpoints, and we would not copy it into a rule for static files. If your real problem is a REST call from another site, our guide to the REST API error in Site Health is the better starting point. For fonts, keep the rule at the web server.

    When a Font Blocked by CORS Policy Points to a Bigger Plan

    A missing header is a configuration change, not a capacity limit, so no plan change clears it. Serving the font from the same host as the page removes the cross-origin request altogether, and a WordPress hosting plan keeps the theme and its font files in one account.

    If you run your own web server configuration, a VPS lets you set the header at the server and the CDN edge yourself. If the console still blocks the font after the steps above, open a ticket with the exact console line, the font URL and the curl -I output, and we will look at it with you.

    Frequently Asked Questions: Blocked by CORS Policy

    How do you fix a font blocked by CORS policy on a WordPress site in 2026?

    Typically you add an Access-Control-Allow-Origin header on the server that hosts the font file, then confirm it with curl -I. In our Chrome 158 lab, three of nine font setups loaded and the six failures had four different causes, so read the console reason first.

    Is Access-Control-Allow-Origin * vs a single origin the safer choice for a font blocked by CORS policy?

    Specifically, both loaded the font in our lab. MDN says the wildcard should only be used for public resources, and a font file is public by design, so in our view the wildcard is reasonable for fonts. One exact origin also works, but it must match the page scheme, host and port.

    Does the AHosting plan I choose change whether a font is blocked by CORS policy in 2026?

    Overall, no. The error comes from a missing or mismatched header, or from a bad font URL, not from plan size, so a bigger plan will not clear it. Moving the font to the same host as the page removes the cross-origin request entirely.

    Why does a WordPress font show a CORS error when the real problem is a 404 or 500 response?

    In practice the browser checks the header before it cares about the status. In our lab a missing file and a 500 response both printed the No Access-Control-Allow-Origin line because the error response carried no header. With the header on the 404, Chrome printed no CORS line, so check the status with curl -I first.

    What should I send AHosting support when a font is still blocked by CORS policy after I add the header?

    Specifically, open a ticket with the exact console line, the font URL and the output of curl -I on that URL, and we will look at it with you. None of those three items contains a password or key.

    Does Vary: Origin matter when a font is blocked by CORS policy behind a cache or CDN?

    Notably, yes when the header value changes with the caller. In our nginx cache test, a response without Vary: Origin was stored for the first origin and served to the second origin with the first origin value. With Vary: Origin the cache kept one copy per origin. A fixed header value such as * does not need it.

    Can a www vs non-www mismatch leave a font blocked by CORS policy even on one domain in 2026?

    Indeed, yes. An origin is the scheme, host and port together, so the apex host and the www host are two origins. In our lab a page on the apex host requesting a font from the www host was blocked until that font response carried a matching header.

    Why does an image from another host load while a font from that host is blocked?

    In other words, the two requests use different modes. A plain img tag does not need permission to display the file, while a font is fetched in CORS mode under the CSS Fonts specification.

    Does WordPress core send an Access-Control-Allow-Origin header for font files like it does for the REST API?

    In fact, no. In the three core files we read, only the REST API and admin-ajax.php send that header, and both run PHP. A font is a static file, so the header has to come from the server or CDN configuration.

    What is the simplest way to keep a font from being blocked by CORS policy on an AHosting WordPress site?

    Typically, serve the font from the same host as the page. A same-origin font loaded in every one of our tests and needs no header. If the font must live on another host, the header goes on that host.

    November 23, 2026
  • Error Establishing a Database Connection in WordPress: Read the Real Cause (2026)

    Error Establishing a Database Connection in WordPress: Read the Real Cause (2026)

    • What Error Establishing a Database Connection Means
    • Why Visitors and Admins See Different Error Establishing a Database Connection Pages
    • The AHosting Database Error Decoder: Five Failures, One Page
    • How to Read the Real Cause
    • Fix Error Establishing a Database Connection on Shared Hosting, Cause by Cause
      • Fix Error Establishing a Database Connection After a Password Change
      • Fix Error Establishing a Database Connection From a Wrong Host or Port
      • Fix Error Establishing a Database Connection When Connections Run Out
      • Fix Cannot Select Database
    • Database Tables Unavailable: The WordPress Repair Page
    • Why Plugins Rarely Cause It
    • When Error Establishing a Database Connection Means a Bigger Plan
    • Frequently Asked Questions: Error Establishing a Database Connection
      • How do I fix the error establishing a database connection in WordPress in 2026?
      • Cannot select database vs error establishing a database connection: which one does my AHosting WordPress site have?
      • What does error establishing a database connection mean in WordPress 7.1 in 2026?
      • Why does my site show error establishing a database connection after I changed the cPanel database user password?
      • Database connection error vs white screen of death: how do I tell which one my WordPress site has?
      • Which debug.log line explains why WordPress shows an error establishing a database connection?
      • What is the AHosting Database Error Decoder and how do I use it?
      • Can the WordPress repair page fix an error establishing a database connection on an InnoDB table?
      • What should I send AHosting support when my site shows an error establishing a database connection?
      • Is it safe to leave WP_DEBUG_LOG on while I fix an error establishing a database connection in 2026?
    TL;DR

    Error establishing a database connection is one page for many different failures. In our WordPress 7.1.5 lab a closed port, an unresolvable host name, a wrong password, a full connection pool and even a wrong database name all gave visitors the same one-line page with HTTP status 500. The real cause is in wp-config.php, in wp-admin or in debug.log. Read the cause first, fix only that, and remove the debug and repair switches afterward.

    Listen: why five different database failures show one page, and where the real cause is. By Matt Chrust, Director of Business Development, AHosting.

    What Error Establishing a Database Connection Means

    Error establishing a database connection is the message WordPress prints when it cannot get a working connection to its database. WordPress stops at that point, before it loads a single plugin or theme, so the page is a one-line dead end. The message does not say why. We pointed WordPress 7.1.5 at five different broken databases to find out what each one looks like, and all five gave visitors the same page.

    The cause is still findable. It sits in wp-config.php, in the wp-admin version of the page, or in the debug log. This guide shows where to look, in what order, and which fix belongs to which clue.

    Why Visitors and Admins See Different Error Establishing a Database Connection Pages

    WordPress shows two versions of the message. The core function dead_db() says so in a code comment: if installing or in the admin, provide the verbose message, otherwise be terse. In our lab a visitor got only the heading Error establishing a database connection, with the page title Database Error and HTTP status 500.

    Open /wp-admin/ and the same failure prints a longer text. It says the username and password in wp-config.php may be wrong, or that contact with the database server at your DB_HOST could not be established, and it names that host. It then asks three questions: is the username and password correct, is the hostname correct, and is the database server running.

    Two other things change what you see. A file named db-error.php in wp-content replaces both pages, so a custom-looking error means someone installed that drop-in. And the front-end page carries no-cache headers in our lab, so a refresh really asks the server again.

    The AHosting Database Error Decoder: Five Failures, One Page

    Each failure leaves a different trace. The table below is our AHosting Database Error Decoder. It was built from five runs on one machine, and it lists what the visitor saw, what wp-admin showed, and the line WordPress wrote to debug.log with logging on.

    Five database failures, one visitor page Five boxes on the left list the failures: server not answering, host name not resolving, wrong password, too many connections and wrong database name. Arrows lead to one box on the right, the visitor page that reads Error establishing a database connection with HTTP status 500. Under each failure a small label gives the clue it leaves: 2002 Connection refused, 2002 getaddrinfo failed, 1045 Access denied, 1040 Too many connections, and no log line with Cannot select database in wp-admin. Results come from a lab run, not a customer server. Five failures, one visitor page Lab result on WordPress 7.1.5. The clue is in the log, not on the page. Server not answering 2002 Connection refused Host name does not resolve 2002 getaddrinfo failed Wrong username or password 1045 Access denied Server out of connections 1040 Too many connections Wrong database name no log line; wp-admin says Cannot select database What the visitor sees Error establishing a database connection HTTP 500, no-cache
    What failedVisitor seeswp-admin showsdebug.log lineWho usually fixes it
    Server not answeringError establishing a database connectionHeading plus the three questions, naming DB_HOST(HY000/2002): Connection refusedYour host
    Host name does not resolveSame one lineSame text, naming the bad hostgetaddrinfo for the host failed, with (HY000/2002) on a second lineYou, in wp-config.php
    Wrong username or passwordSame one lineSame text(HY000/1045): Access denied for userYou, in wp-config.php or cPanel
    Server out of connectionsSame one lineSame text(08004/1040): Too many connectionsYour host, or time
    Wrong database name or no privilegeSame one lineCannot select database, with a list of checksNothing writtenYou, in DB_NAME or privileges
    AHosting Database Error Decoder. Lab: WordPress 7.1.5 on PHP 8.5.10, macOS. The first two rows are real client behavior. The other three used a small scripted stand-in that sends the error packets, not a real MySQL server. Not an AHosting server.

    The honest limit of this table is the stand-in. Its error numbers match the MySQL error reference: 1040 Too many connections, 1045 Access denied and 1049 Unknown database. What we tested was how WordPress reacts, and that part ran on real WordPress code.

    Look hardest at the wrong-database row. Because the login worked, the connection did succeed. Visitors still saw Error establishing a database connection, though, and the log stayed empty.

    How to Read the Real Cause

    With debug logging off, WordPress writes nothing about a failed connection. Turn it on for one reload and read the result. This takes about two minutes in cPanel File Manager.

    1. Open wp-config.php and add define( 'WP_DEBUG', true );, then define( 'WP_DEBUG_LOG', true );, then define( 'WP_DEBUG_DISPLAY', false ); above the line that says to stop editing.
    2. Reload the broken page once, then open wp-content/debug.log.
    3. Find the line that names mysqli_real_connect. The number after HY000 or 08004 is the MySQL error number.
    4. Set WP_DEBUG back to false and delete debug.log. The log is a plain file, and our guide on a potentially public log file explains why it should not stay.

    WordPress calls mysqli_real_connect without suppressing warnings only when WP_DEBUG is true, which is why the log stays empty otherwise. That is the code at line 1989 of class-wpdb.php in 7.1.5. A wrong database name never reaches this step, so for that case read the wp-admin page instead.

    Database Error Reader

    See what a shared hosting plan includes

    Fix Error Establishing a Database Connection on Shared Hosting, Cause by Cause

    Match your clue to one row of the next table, then fix only that. Changing three things at once hides which one worked.

    CauseCheckChange
    Wrong user or password (1045)cPanel MySQL Databases: the user added to the database. In wp-config.php: DB_USER and DB_PASSWORD.Reset the user password in cPanel and paste the identical value into DB_PASSWORD.
    Host does not resolve (2002 getaddrinfo)DB_HOST in wp-config.php.Use the value your host documents. After a move, an old server name often stays behind.
    Nothing listening (2002 Connection refused)Whether phpMyAdmin opens, and whether other sites on the account fail the same way.If the whole account fails, open a ticket with the log line. If DB_HOST has a port, confirm it.
    Out of connections (1040)Whether the error comes and goes.Wait, then ask your host. Look for bot floods meanwhile.
    Wrong database nameDB_NAME against the exact name in cPanel, including the account prefix.Correct the name, and confirm the user is added to that database.
    Fixes by clue. Check one thing, change one thing.

    Fix Error Establishing a Database Connection After a Password Change

    A password changed in cPanel does not update WordPress. WordPress keeps sending the old value, and the server answers 1045. Copy the new password into DB_PASSWORD without spaces, save, and reload.

    Fix Error Establishing a Database Connection From a Wrong Host or Port

    MySQL documents that error 2002 usually means no server is running or the socket or port is wrong. In our lab a closed port and an unresolvable name both produced it. The log text differs, so read the words after the number: Connection refused for the first, getaddrinfo for the second.

    Fix Error Establishing a Database Connection When Connections Run Out

    The MySQL manual describes error 1040 as every available connection being in use by other clients. On shared hosting that pool is not yours alone, so you cannot raise it from wp-config.php. If it keeps returning, our resource limit diagnostic tree shows how to tell a traffic spike from a runaway process.

    Fix Cannot Select Database

    WordPress itself lists the three checks: does the database exist, does the user have permission to use it, and is the name prefixed with the account name, such as username_name. On cPanel the prefix is the usual culprit after a manual import.

    Database Tables Unavailable: The WordPress Repair Page

    A fifth message appears only in wp-admin. If core tables are missing, is_blog_installed() prints that one or more database tables are unavailable and that the database may need to be repaired, with a link to maint/repair.php. We read this in the source and did not reproduce it in the lab.

    StepWhat WordPress runsWhere in 7.1.5
    Switch onRequires define( 'WP_ALLOW_REPAIR', true ); in wp-config.php. No login is needed.repair.php line 28
    CheckCHECK TABLE on each WordPress tableline 111
    RepairREPAIR TABLE, only for a table the check reports as not okayline 121
    OptionalANALYZE TABLE, then OPTIMIZE TABLE, when you choose repair and optimizelines 136 and 143
    Switch offThe page tells you to remove the line so unauthorized users cannot use itline 170
    What the repair page does. Source: wp-admin/maint/repair.php, WordPress 7.1.5.

    Remove the line when you finish, because anyone can open that page while it is set. There is one more catch. MySQL documents that REPAIR TABLE works for MyISAM, ARCHIVE and CSV tables. On InnoDB the server answers with the message from MySQL bug 42563, that the storage engine does not support repair. A request to map it to a rebuild was closed without doing so. Expect to restore a backup instead.

    Why Plugins Rarely Cause It

    The usual advice is to rename the plugins folder. For a connection failure it changes nothing. In 7.1.5, wp-settings.php loads the database class at line 136, but must-use plugins load at line 506 and regular plugins at line 582. A failed connection ends the request before either runs.

    A plugin can still cause the load that exhausts connections, so 1040 is the one case where a plugin is a suspect. The other database message that stops WordPress this early is a missing PHP driver, covered in our guide to the missing MySQL extension error. If you see an empty page rather than a heading, see the white screen of death guide, and a 502 is a different layer again, covered in our 502 Bad Gateway guide.

    When Error Establishing a Database Connection Means a Bigger Plan

    Fix the clue first. Only the 1040 case ever points at capacity, and only when it returns after you have removed bots and stuck jobs. If it keeps coming back on an account with real traffic, a plan with more room is the fix. Our WordPress hosting plans are the next step up for a busy site, and a VPS gives you a database server of your own.

    If the clue is a credential, a host name or a database name, no plan change helps. Those are one line in wp-config.php.

    Frequently Asked Questions: Error Establishing a Database Connection

    How do I fix the error establishing a database connection in WordPress in 2026?

    Specifically, read the cause before you change anything. Turn on WP_DEBUG_LOG for one reload, read the mysqli line in wp-content/debug.log, and match its number against the decoder table above. A 2002 line points at the host name or the server, 1045 points at the username or password, and 1040 means the server is out of connections.

    Cannot select database vs error establishing a database connection: which one does my AHosting WordPress site have?

    In contrast to the connection error, Cannot select database means WordPress reached the server and the login worked. It only shows in wp-admin, because visitors still see the one-line error establishing a database connection page. Check DB_NAME and the account prefix in cPanel next.

    What does error establishing a database connection mean in WordPress 7.1 in 2026?

    In other words, WordPress could not open a working connection to its database, or could not select the database it was told to use. Core stops at that point before any plugin or theme loads, and in our lab it answered with HTTP status 500.

    Why does my site show error establishing a database connection after I changed the cPanel database user password?

    Typically, the new password was never copied into DB_PASSWORD in wp-config.php. WordPress keeps using the old value, the server answers 1045 Access denied, and the visitor sees the same one-line page as for any other cause. Paste the new value exactly, with no spaces.

    Database connection error vs white screen of death: how do I tell which one my WordPress site has?

    First and foremost, look at the text. The database error prints a heading, while a white screen prints nothing or a critical error notice. A connection failure also stops before plugins load, so renaming the plugins folder changes nothing for it, which is the quickest way to tell them apart.

    Which debug.log line explains why WordPress shows an error establishing a database connection?

    Specifically, look for the line that begins with PHP Warning and names mysqli_real_connect. The number in brackets after HY000 or 08004 is the MySQL error number, and the words after it are the reason. If the log stays empty while wp-admin says Cannot select database, the database name is wrong.

    What is the AHosting Database Error Decoder and how do I use it?

    Specifically, it is the table in this guide that maps five failures to what visitors see, what wp-admin shows and what debug.log records. Find your log line in the fourth column, then read across to see who usually fixes it. It was built from a lab run on WordPress 7.1.5, not from a customer server.

    Can the WordPress repair page fix an error establishing a database connection on an InnoDB table?

    However, the repair page only helps when WordPress can already connect. MySQL documents REPAIR TABLE for MyISAM, ARCHIVE and CSV tables, so on InnoDB expect it to report a table as not okay and then fail to repair it. Restore a backup or ask your host instead.

    What should I send AHosting support when my site shows an error establishing a database connection?

    In practice, send the exact debug.log line, the time you saw it, and whether wp-admin shows the longer message or Cannot select database. Add whether phpMyAdmin opens in cPanel. Those four facts let support tell a server problem from a wp-config.php problem without guessing.

    Is it safe to leave WP_DEBUG_LOG on while I fix an error establishing a database connection in 2026?

    Overall, no. The log is a plain file inside wp-content and can be requested by URL on many setups. Turn WP_DEBUG back to false and delete debug.log as soon as you have read the line, because it can contain paths and user names.

    November 20, 2026
  • Fork: Retry: Resource Temporarily Unavailable on Shared Hosting: What Fills the Process Limit (2026)

    Fork: Retry: Resource Temporarily Unavailable on Shared Hosting: What Fills the Process Limit (2026)

    • What Fork: Retry: Resource Temporarily Unavailable Means
    • Why Resource Temporarily Unavailable Never Reaches the Site Error Log
      • Why the Word Retry Appears
    • What Fills the Slots: Processes, Threads and Your Own Shell
    • AHosting Process Ceilings: 200, 300 and 400 Slots
    • Count Your Slots Before You Guess
    • How to Find What Holds Your Process Slots
      • First Step: Count What You Own
      • Second Step: Group by Command
      • Third Step: Stop the Leftovers
    • Usual Suspects When Resource Temporarily Unavailable Appears on WordPress
    • Resource Temporarily Unavailable or Something Else: A Decoder
    • When Resource Temporarily Unavailable Means You Need a Bigger Plan
    • Frequently Asked Questions About Resource Temporarily Unavailable
      • What does fork: retry: resource temporarily unavailable mean on shared hosting in 2026?
      • Is resource temporarily unavailable a memory error or a process limit error?
      • How do I fix bash: fork: retry: resource temporarily unavailable in cPanel Terminal?
      • Does the nproc command vs ulimit -u show my real process limit in 2026?
      • Why does resource temporarily unavailable appear over SSH but not in my WordPress error log?
      • NPROC vs entry processes: which limit does resource temporarily unavailable point to?
      • How many total processes does an AHosting shared plan allow in 2026?
      • Will AHosting WordPress hosting stop resource temporarily unavailable errors after an upgrade?
      • Can a VPS from AHosting avoid the resource temporarily unavailable process ceiling?
      • Should I raise ulimit or find what is filling process slots first in 2026?
    TL;DR

    Fork: retry: resource temporarily unavailable means the operating system refused to start another process for your account. The cap counts threads as well as processes, and the message appears in SSH, cPanel Terminal and cron mail, not in the site error log. On AHosting shared plans the ceiling is 200, 300 or 400 total processes. Count what you own, stop the leftovers, and upgrade only when the count is high without them.

    Listen: why the shell refuses one more process and what to stop first. By Matt Chrust, Director of Business Development, AHosting.

    What Fork: Retry: Resource Temporarily Unavailable Means

    Fork: retry: resource temporarily unavailable is the message a shell prints when the operating system refuses to start one more process for your account. It shows up in SSH, in the cPanel Terminal and in cron output, and it means the account has used every process slot it is allowed. The words come from the kernel error EAGAIN, which the Linux fork manual page lists as the answer when a process limit has been reached.

    In practice the limit that usually answers is the per-user process cap. The getrlimit manual page says it counts threads as well as processes for one user ID, and that it is not enforced for root. On a CloudLinux shared host the same idea is called NPROC, and the CloudLinux limits documentation describes it as the total number of processes and threads inside your account’s container.

    It is not a memory error and it is not a disk error. A full disk says no space left on device, and a memory kill ends a process that already exists. This message is the refusal of a process that has not started yet.

    One account’s 200 process slots, filling up A horizontal bar of 200 process slots on a Bronze plan. Blue marks up to 30 PHP workers, teal marks shell sessions, amber marks cron and WP-CLI jobs, and red marks leftover processes that never exited. When the bar is full, the next fork is refused with resource temporarily unavailable. Proportions are an illustration, not a measurement. One Bronze account: 200 total process slots Illustration of how the slots can fill. Proportions are not measured. PHP workers up to 30 shells cron and WP-CLI leftovers that never exited, plus ffmpeg threads 200 = ceiling bash: fork: Resource temporarily unavailable

    Why Resource Temporarily Unavailable Never Reaches the Site Error Log

    The shell prints this message to your terminal, so no website log records it. A cron job sends it to the account’s cron mail instead. WordPress never sees it, which is why people search for it after a command fails rather than after a page does.

    Visitors meet the same shortage differently. CloudLinux says Apache may answer with a 500 or 503 page when the container has no free process slot, and it increments an NPROC counter each time the limit is hit. Our own resource-limit diagnostic tree maps those pages to the limit behind them.

    A PHP script that tries to start a process may log its own failure text. We did not reproduce that wording, so we do not quote it here.

    Why the Word Retry Appears

    The word retry means bash tried the fork again instead of giving up at once. We reproduced the refusal on a Mac by lowering ulimit -u to 25 slots above the user’s running process count and asking for 60 background jobs. About 45 were running when the shell was refused, and it printed fork: Resource temporarily unavailable. The bash that ships with macOS is version 3.2 and printed the short form, so your server may show retry lines first. This lab was one Mac, not a CloudLinux server.

    What Fills the Slots: Processes, Threads and Your Own Shell

    A slot is any process or thread owned by your account. Everything in the table below spends slots from the same pool, including the shell you are typing in.

    What takes slotsHow it countsTypical cause of a pile-up
    PHP workersOne process for each PHP request running nowSlow uncached requests stacking up
    Web server workersProcesses and threads inside your container, per CloudLinuxA burst of uncached traffic or bots
    SSH and Terminal sessionsThe shell plus every command it startedOld sessions left open
    Cron and WP-CLI jobsOne process per job, often with childrenA job that starts again before the last one ends
    Multi-threaded toolsEach thread is a slot on Linuxffmpeg started with default threads
    What spends process slots on a shared hosting account

    Threads matter because Linux counts them against the same cap. Our guide to slow ffmpeg encoding on shared hosting explains why ffmpeg starts a thread for every core it can see, which spends slots quickly.

    AHosting Process Ceilings: 200, 300 and 400 Slots

    Total processes is a different number from entry processes. Entry processes cap how many PHP requests run at once, and total processes cap everything else as well. Cached pages never reach PHP, so a cached visit takes no entry process.

    PlanTotal processesEntry processesSlots beyond the entry cap
    Bronze20030170
    Silver30040260
    Gold40050350
    AHosting Process Ceilings. Source: the AHosting web hosting plan page, read 18 November 2026. The WordPress hosting plans list the same three figures.

    Every limit applies to the whole account and is shared by every website on it, so five sites on one plan spend one pool. CloudLinux also advises setting NPROC above the entry process limit plus 15, because web server processes and SSH sessions live in the same container. Each plan clears that by a wide margin, so a refusal usually means something is holding slots, not that the ceiling is too low.

    Count Your Slots Before You Guess

    The next section shows how to read your own counts. Type them in below to see how close a typical hour comes to the ceiling.

    Check Your Process Slot Budget

    See the process limit of every plan

    How to Find What Holds Your Process Slots

    Red Hat's support article on this error says there are several causes and that you should confirm the process and thread counts are expected before raising any limit. We follow that order. Count first, then group, then stop.

    First Step: Count What You Own

    Open the cPanel Terminal and run ulimit -u to see the cap your shell inherited. Then count your threads and processes with ps -u "$USER" -L | wc -l. Red Hat's article uses the same -L switch with ps -eLf to count threads. Subtract one for the header line. We ran the macOS form of the count in our lab and have not timed these exact commands on a customer server, so compare the result with the plan table above.

    Second Step: Group by Command

    Run ps -u "$USER" -o comm= | sort | uniq -c | sort -rn | head. The command that appears dozens of times is the one holding your slots. Ten php lines mean busy requests. Fifty wp or ffmpeg lines mean a job started again and again.

    Third Step: Stop the Leftovers

    Stop one stuck job with kill and its process ID, then count again. Leave PHP workers alone while the site is serving visitors, because stopping one cuts a live request. Close old SSH sessions as well, since each one holds a shell. If a slot count stays high with nothing obvious to stop, ask support to read the account fault counters.

    Usual Suspects When Resource Temporarily Unavailable Appears on WordPress

    Four causes are common on WordPress accounts. Each one fills slots in a different way.

    • Overlapping cron. A job that takes longer than its interval starts a second copy while the first still runs. WordPress cron jobs on hosting covers how to space them.
    • WP-Cron firing on every visit. Each trigger can start a process, and disabling WP-Cron, measured shows the effect of moving it to a real schedule.
    • Bot floods. Uncached requests from crawlers spend PHP workers and web server slots together, which the 508 resource limit guide explains from the entry process side.
    • Media tools. ffmpeg and image jobs spawn threads that each take a slot.

    Before blaming the plan, rule these out. A job that keeps restarting will fill a larger ceiling just as it fills a smaller one.

    Resource Temporarily Unavailable or Something Else: A Decoder

    The same words can come from other limits, and the man page lists several. Use the table to pick the right layer before you change anything.

    What you seeLikely layerWho can change it
    Fork refused, process count near the plan figureAccount process cap (NPROC)You, by stopping jobs; the host, by plan
    Fork refused, count is lowA different limit, such as a host-set shell capThe host
    508 or 503 page, shell worksEntry processes (PHP workers)You, by caching; the host, by plan
    Allowed memory size exhausted in a logPHP memory_limitYou, in PHP settings
    No space left on deviceDisk or inodesYou, by cleaning files
    Same text on a VPSOperating system cap, PID limit or cgroup limitYou, as root
    AHosting Process Slot Decoder

    Some hosts also set a shell-level cap of their own. cPanel's support documentation describes a Shell Fork Bomb Protection setting that is on by default in WHM and can make a command fail with a similar message. That is the host's setting, so ask which layer answered. On a VPS the kernel itself can refuse, through the PID ceiling or a container limit, as the Red Hat article notes, and its companion on the nproc setting shows where Red Hat raises the user cap.

    When Resource Temporarily Unavailable Means You Need a Bigger Plan

    If the count is high with nothing stuck, the account has outgrown its ceiling. A busy store, several sites sharing one plan or regular media jobs all need more slots than they used to. AHosting web hosting steps from 200 to 400 total processes, and WordPress hosting lists the same three figures.

    A VPS is the next step when you want to set the cap yourself. It has guaranteed vCPU and RAM and full root access, and a runaway job can still fill the limit you choose. The tuning above is what we would do first on any plan.

    Frequently Asked Questions About Resource Temporarily Unavailable

    What does fork: retry: resource temporarily unavailable mean on shared hosting in 2026?

    Specifically, it means the kernel refused to start one more process for your account because a limit was reached, and the shell printed the refusal. The limit is usually the per-user process cap, which counts threads as well as processes, so it is neither a memory error nor a disk error.

    Is resource temporarily unavailable a memory error or a process limit error?

    Typically, in shared hosting it is a process limit error, because the message is the refusal of a process that has not started yet. A memory limit usually ends a process that already exists, and a full disk reports no space left on device instead. That said, the same wording can come from other limits, so count your processes before you decide.

    How do I fix bash: fork: retry: resource temporarily unavailable in cPanel Terminal?

    In practice, wait a minute and close extra Terminal or SSH sessions, because each one holds slots. Then list your processes, stop the leftovers such as a stuck WP-CLI or ffmpeg job, and run the command again. If the count is normal and the message returns, ask your host to read the account fault counters.

    Does the nproc command vs ulimit -u show my real process limit in 2026?

    In contrast to what the name suggests, the nproc command prints the number of processing units available, which is a CPU count and not a process limit. The ulimit -u command reports the per-user process cap that your shell inherited, which is the closer number. On a CloudLinux host the container limit can still differ, so treat the published plan figure as the ceiling.

    Why does resource temporarily unavailable appear over SSH but not in my WordPress error log?

    Indeed, the message is printed by the shell to your terminal or to cron mail, and WordPress never sees it. Visitors meet the same shortage as a 500 or 503 page instead, which CloudLinux documents for this limit. A PHP script that tries to start a process may log its own failure text.

    NPROC vs entry processes: which limit does resource temporarily unavailable point to?

    By contrast with a 508 page, this message points to NPROC, the total process and thread count. Entry processes cap simultaneous PHP execution, and a site can hit that limit while the total count stays low. The two are separate numbers on every plan, so read both.

    How many total processes does an AHosting shared plan allow in 2026?

    Specifically, as of November 2026 the AHosting web hosting plan page lists 200 total processes on Bronze, 300 on Silver and 400 on Gold. Entry processes are listed separately at 30, 40 and 50. Both figures apply to the whole account and are shared by every website on it.

    Will AHosting WordPress hosting stop resource temporarily unavailable errors after an upgrade?

    However, an upgrade only helps when the account is genuinely busy. The WordPress hosting plans list the same 200, 300 and 400 total processes, so a higher tier gives more headroom but does not remove a runaway job. Clear stuck processes first, and upgrade when the count is high without them.

    Can a VPS from AHosting avoid the resource temporarily unavailable process ceiling?

    Overall, a VPS removes the shared account ceiling but not the limit itself. You get a KVM machine with guaranteed vCPU and RAM and full root access, so the process cap is the operating system's own and you control it. A runaway job can still fill that cap.

    Should I raise ulimit or find what is filling process slots first in 2026?

    First and foremost, find what is filling the slots. Red Hat advises confirming that the process and thread counts are expected before raising any limit, because a higher cap on top of a leak only delays the failure. On shared hosting you cannot raise the account ceiling yourself anyway.

    November 19, 2026
1 2 3 … 16
Next Page→
Ahosting Logo

Hosting

  • WordPress Hosting
  • Web Hosting
  • FFmpeg Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • VPS Hosting
  • Dedicated Server

Domain

  • Register a Domain
  • Domain Transfer
  • Premium SSL Certificate

Support

  • Knowledge Base
  • Abuse Report
  • Submit A Ticket

Company

  • Compare Hosts
  • About Us
  • Datacenter
  • Contact Us
  • Blog
  • Sitemap

Legal

  • Privacy Policy
  • Terms of Service
  • Acceptable Use Policy
  • Service Level Agreement
  • Resource Abuse Policy
  • Hosting
    • WordPress Hosting
    • Web Hosting
    • FFMpeg Hosting
    • WooCommerce Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Server
  • Domain
    • Register a Domain
    • Domain Transfer
    • Premium SSL Certificate
  • Support
    • Knowledge Base
    • Abuse Report
    • Submit A Ticket
  • Company
    • About Us
    • Datacenter
    • Contact Us
    • Blog
    • Sitemap
  • Legal
    • Privacy Policy
    • Terms of Service
    • Acceptable Use Policy
    • Service Level Agreement
    • Resource Abuse Policy

Copyright © 2026 All Rights Reserved

Ahosting, Inc. BBB Accredited Business, A+ rating
Facebook X/Twitter Instagram LinkedIn YouTube