Skip to content

My personal IT story is here

Menu
Menu

Fixing WordPress HTTPS Issues Behind Nginx Proxy Manager

Posted on August 18, 2025August 18, 2025 by wpadmin

If your WordPress site is running on private hosting and you notice broken layouts or strange CSS even though SSL is enabled, the problem might be that WordPress is still trying to load content over HTTP instead of HTTPS.

This usually happens when the hosting panel or proxy doesn’t correctly forward the HTTPS status to WordPress.

Solution:

  1. Open the wp-config.php file in the root directory of your WordPress installation.
  2. Just before the line:

/* That’s all, stop editing! Happy publishing. */

add this code:

if (isset($_SERVER[‘HTTP_X_FORWARDED_PROTO’]) && $_SERVER[‘HTTP_X_FORWARDED_PROTO’] === ‘https’) {
$_SERVER[‘HTTPS’] = ‘on’;
}

  1. Save the file and exit.

This tells WordPress that your site is running over HTTPS, even when it’s behind Nginx Proxy Manager, ensuring your styles and scripts load correctly.

  • Nginx Proxy Manager (auto install)
  • Installing HestiaCP (Root Access Required on a Fresh Linux System)
  • Fixing WordPress HTTPS Issues Behind Nginx Proxy Manager
  • IP Tables

My Projects:
Web-Data
English-Portal
Game-Zone

  • LinkedIn