WordPress: Issues with Plugins when only admin area is using SSL

On another Blog I have (http://www.ff-pitten.at) I recently activated SSL for the admin area (see https://codex.wordpress.org/Administration_Over_SSL).

After this change, I was able to securly login, but suddenly some plugins failed to fetch some JavaScript and CSS files.

While debugging this issue I found that those plugins use the configured URL for the site (set at Settings -> General -> WordPress Address (URL) and Site Address (URL)).

To solve this issue, you need to specify the WP Address and Site Address depending on how the current page is called (http or https).

Just add to the wp-config.php file the folling before the file ‘wp-settings.php’ is included:

define(MY_BASE_URL, "www.ff-pitten.at");
if ($_SERVER['REQUEST_SCHEME'] == "https") {
} else {

HINT: you should change the MY_BASE_URL to your URL….

Leave a Reply

Your email address will not be published. Required fields are marked *