Title: Get PHP error when loading wordpress pages.
Last modified: December 2, 2025

---

# Get PHP error when loading wordpress pages.

 *  Resolved [joeballa](https://wordpress.org/support/users/joeballa/)
 * (@joeballa)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/get-php-error-when-loading-wordpress-pages/)
 * Get the error below every time a page is loaded.
 *     ```
       Stack trace:
       {main}() /var/www/html/realmlsstage/index.php:0
       require() /var/www/html/realmlsstage/index.php:17
       wp($query_vars = *uninitialized*) /var/www/html/realmlsstage/wp-blog-header.php:16
       WP->main($query_args = '') /var/www/html/realmlsstage/wp-includes/function.php:1342
       WP->parse_request($extra_query_vars = '') /var/www/html/realmlsstage/wp-includes/class-wp:818
       preg_match($pattern = '#^?page_id=23279/?$#', $subject = 'stageaccess', $matches = NULL) /var/www/html/realmlsstage/wp-includes/class-wp.php:239
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fget-php-error-when-loading-wordpress-pages%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [FahimMurshed](https://wordpress.org/support/users/fahimmurshed/)
 * (@fahimmurshed)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/get-php-error-when-loading-wordpress-pages/#post-18739939)
 * This error usually happens when a bad rule gets saved to the database. “Flushing”
   the permalinks forces WordPress to delete the corrupted rules and regenerate 
   clean ones.
 * a. Log in to your WordPress Admin Dashboard.
 * b. Go to Settings > Permalinks.
 * c. Scroll down and click Save Changes. (You do not need to change any settings,
   just clicking save is enough).
 * d. Check your site to see if the error is gone.
 * If the error returns immediately after flushing, a specific plugin or custom 
   code is actively injecting this bad rule.
 * **The Clue:** The error mentions `page_id=23279`.
 * a. Check Redirection Plugins: If you use a plugin like “Redirection” or “Safe
   Redirect Manager,” look for a rule involving Page ID 23279. You likely added 
   a ? by mistake in a “Source URL” field.
 * b. Check Page ID 23279: Find the page with ID 23279. Is there a custom setting
   on that specific page (in a meta box) regarding custom permalinks or redirects?
 * c. Search the Database: If you have access to the database (via phpMyAdmin), 
   search the **wp_options** table -> **rewrite_rules** row. If you delete the value
   of this row (make it blank) and save, it will force WordPress to regenerate default
   rules on the next load.`
 * Try above Method first. If that solves it, you are done. If the site crashes 
   again later, you need to hunt down the plugin managing Page ID 23279.
 *  Thread Starter [joeballa](https://wordpress.org/support/users/joeballa/)
 * (@joeballa)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/get-php-error-when-loading-wordpress-pages/#post-18741252)
 * Thank you, that resolved my issue.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fget-php-error-when-loading-wordpress-pages%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [joeballa](https://wordpress.org/support/users/joeballa/)
 * Last activity: [5 months, 3 weeks ago](https://wordpress.org/support/topic/get-php-error-when-loading-wordpress-pages/#post-18741252)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
