Initially, I assumed that since both Docker and LXC are containerization solutions, the transition would be a seamless switch. After all, Docker manages containers at the application level, while LXC offers a more lightweight, system-level virtualization. With that in mind, I prepared my environment, exported the Docker container, and attempted to import it into an LXC container. However, I quickly ran into a series of unexpected issues, configuration mismatches, network inconsistencies, and filesystem permissions that didn’t translate directly. It became clear that this wasn’t just a simple copy-paste job; migrating a WordPress site involved more nuanced adjustments, particularly around the web server configuration, persistent storage, and database connectivity. Ultimately, I had to carefully reconfigure the LXC environment, manually set up the necessary services, and restore the data from backups to ensure everything functioned smoothly.
To my future self, configuration values go at the TOP of the configuration file, not at the bottom..
// Force SSL for Admin
define( ‘FORCE_SSL_ADMIN’, true );
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if( strpos( $_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false )
$_SERVER[‘HTTPS’] = ‘on’;
Leave a Reply
You must be logged in to post a comment.