How Can We Help?

Website Not Rendering Correctly (including the WordPress Admin Dashboard)

You are here:
< All Topics

The problem:

 

Checking in Chrome DevTools, we get the following output for the Knowledge Base plugin admin page which was not displaying correctly in the Admin Dashboard.

 

The site itself was also not rendering correctly.

 

Mixed Content: The page at ‘https://kevwells.com/wp-admin/options-general.php’ was loaded over HTTPS, but requested an insecure element ‘https://3.222.27.169/wp-content/plugins/css-javascript-toolbox/views/blocks/manager/public/images/menu.svg’. This request was not upgraded to HTTPS because its URL’s host is an IP address.
options-general.php:33 GET https://3.222.27.169/wp-content/plugins/sucuri-scanner/inc/css/styles.css?ver=3db36a9 net::ERR_CERT_COMMON_NAME_INVALID

 

Note a wordpress plugin for the website is trying to call http://3.222.27.169 instead of https://kevwells.com

 

-why??

 

probably because the site definitions are for the IP address in the wordpress database for the site, instead of for the domain name.

 

Lets check.

 

We go into mariadb sql server database for the wordpress website, using the mariadb CLI….

 

and check the definitions set there:

 

select the kevwells database, and check the table entry for home and siteurl:

 

root@ip-172-31-82-94:~# mysql -u root -p
Enter password: * * * * * * (not displayed here)

 

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 70292
Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04

 

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

 

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]>

 

MariaDB [kevwells]> show databases ;

+——————–+
| Database |
+——————–+
| information_schema |
| kevwells |
| mysql |
| performance_schema |
| phpmyadmin |
| sys |
| wordpress |
+——————–+
7 rows in set (0.000 sec)

 

MariaDB [kevwells]> use kevwells;
Database changed

 

and what do we find when we check the definitions for home and siteurl in the wp_options table:

 

MariaDB [kevwells]> SELECT * from wp_options WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
+———–+————-+———————-+———-+
| option_id | option_name | option_value | autoload |
+———–+————-+———————-+———-+
| 33 | home | http://3.222.27.169 | yes |
| 1 | siteurl | http://3.222.27.169/ | yes |
+———–+————-+———————-+———-+
2 rows in set (0.000 sec)

MariaDB [kevwells]>

 

This is the cause of the problem: the http://3.222.27.169 entries for home and siteurl

 

so, these definitions need to be set to https://kevwells.com for each

 

UPDATE wp_options SET option_value = http://www.example.com/blog WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

 

UPDATE wp_options SET option_value = https://kevwells.com WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

 

MariaDB [kevwells]> UPDATE wp_options SET option_value = https://kevwells.com WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘://kevwells.com WHERE option_name = ‘home’ OR option_name = ‘siteurl” at line 1
MariaDB [kevwells]>

 

slight problem with mariadb vs mysqldb… we have to use different inverted commas for part of the command:

 

you have to use ” ” :

 

So it needs to look like this:

 

UPDATE wp_options SET option_value = “https://kevwells.com” WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

 

MariaDB [kevwells]> UPDATE wp_options SET option_value = “https://kevwells.com” WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
Query OK, 2 rows affected (0.001 sec)
Rows matched: 2 Changed: 2 Warnings: 0

 

MariaDB [kevwells]>

 

now its set correctly.

 

finally, verify the change:

 

SELECT * from wp_options WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

 

MariaDB [kevwells]> SELECT * from wp_options WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

+———–+————-+———————-+———-+
| option_id | option_name | option_value | autoload |
+———–+————-+———————-+———-+
| 33 | home | https://kevwells.com | yes |
| 1 | siteurl | https://kevwells.com | yes |
+———–+————-+———————-+———-+
2 rows in set (0.000 sec)

MariaDB [kevwells]>

 

all ok.

 

MariaDB [kevwells]> quit
Bye
root@ip-172-31-82-94:~#

 

The site is now displaying correctly.

Table of Contents