mikeski.net kotlin java javascript hugo development

mikeski.net development blog

Migragte Wordpress to Docker

I had several problems when migrating wordpress to Docker wordpress.

  • Blank white page
  • Infinite redirect on wp-admin login page
  • Need to update wp-config.php file for ssl

How to fix it

To fix this, enable SSL on the site everywhere, update wp-config.php (you have to create a docker volume and mount /var/www/html on it, or create your own docker image) to have:

$_SERVER['HTTPS'] = 'on';

and update the database table so that these 2 options are set correctly:

MariaDB [blog]> select * from wp_options where option_value like 'https://%';
+-----------+-------------+--------------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+--------------------------+----------+
| 1 | siteurl | https://blog.mikeski.net | yes |
| 33 | home | https://blog.mikeski.net | yes |
+-----------+-------------+--------------------------+----------+
2 rows in set (0.00 sec)