Title: WordPress installation under HTTPS
Last modified: June 8, 2024

---

# WordPress installation under HTTPS

 *  Resolved [qneo](https://wordpress.org/support/users/qneo/)
 * (@qneo)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/)
 * Hi.
 * I am trying to install wordpress under the https version of my domain, but the
   installation page looks like this:
 * ![](https://i0.wp.com/i.ibb.co/MB3TvvZ/Sk-rmbild-2024-06-08-222203.png?ssl=1)
 * I understand that it is a “mixed content” issue and that requests are sent to
   http instead of https, but it feels like there should be a setting that corrects
   the requests according to the protocol used instead of me redirecting everything
   to https.
   Best regards

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/#post-17811445)
 * > I understand that it is a “mixed content” issue
 * – Disable all caching and optimization plugins,
    – Install the plugin [Better Search And Replace](https://wordpress.org/plugins/better-search-replace/).
   Search for [http://example.com](http://example.com) and replace with [https://example.com](https://example.com);
   Review this tutorial: [https://www.wpbeginner.com/plugins/how-to-fix-the-mixed-content-error-in-wordpress-step-by-step/](https://www.wpbeginner.com/plugins/how-to-fix-the-mixed-content-error-in-wordpress-step-by-step/)–
   Re-enable your caching and optimiztion plugins and clear the cache. – Disable/
   delete “Better Search Replace”.
 *  Thread Starter [qneo](https://wordpress.org/support/users/qneo/)
 * (@qneo)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/#post-17811455)
 * Thanks for your reply.
 * Are all these steps necessary?
 * Is it not possible to set up https in advance for a new site? For example, declare
   a variable in a config file so that wordpress knows what it’s about right from
   the start.
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/#post-17811458)
 * I find it strange that you have such a view at all. I almost always install my
   WordPress projects with SSL, I’ve never seen anything like this.
 * My tip would be that something is wrong with your server configuration. The styles
   are probably not being loaded. Have a look at the server to see if you can find
   any errors there. In the error log, for example
 * Otherwise, you could also create the `wp-config.php` manually. To do this, copy
   wp-config-sample..php and adjust the information in it. There you can also configure
   the domain to be used with these two entries:
 *     ```wp-block-code
       define( 'WP_HOME', 'https://example.com' );define( 'WP_SITEURL', 'https://example.com' );
       ```
   
 * Source: [https://developer.wordpress.org/advanced-administration/upgrade/migrating/](https://developer.wordpress.org/advanced-administration/upgrade/migrating/)
 *  Thread Starter [qneo](https://wordpress.org/support/users/qneo/)
 * (@qneo)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/#post-17811467)
 * > The styles are probably not being loaded. Have a look at the server to see 
   > if you can find any errors there. In the error log, for example
 * Yes, the dev console shows that requests are sent for css & js files, but via
   http. So something is not right from the start, maybe something is missing in
   the config file?
 *     ```wp-block-code
       <?phpdefine( 'DB_NAME', 'wp' );/** Database username */define( 'DB_USER', 'wp' );/** Database password */define( 'DB_PASSWORD', 'wpwp123' );/** Database hostname */define( 'DB_HOST', 'localhost' );/** Database charset to use in creating database tables. */define( 'DB_CHARSET', 'utf8' );/** The database collate type. Don't change this if in doubt. */define( 'DB_COLLATE', '' );define( 'AUTH_KEY',         'put your unique phrase here' );define( 'SECURE_AUTH_KEY',  'put your unique phrase here' );define( 'LOGGED_IN_KEY',    'put your unique phrase here' );define( 'NONCE_KEY',        'put your unique phrase here' );define( 'AUTH_SALT',        'put your unique phrase here' );define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );define( 'LOGGED_IN_SALT',   'put your unique phrase here' );define( 'NONCE_SALT',       'put your unique phrase here' );$table_prefix = 'wp_';define( 'WP_DEBUG', false );/* Add any custom values between this line and the "stop editing" line. *//* That's all, stop editing! Happy publishing. *//** Absolute path to the WordPress directory. */if ( ! defined( 'ABSPATH' ) ) {	define( 'ABSPATH', __DIR__ . '/' );}/** Sets up WordPress vars and included files. */require_once ABSPATH . 'wp-settings.php';
       ```
   
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/#post-17811471)
 * Add the 2 lines I mentioned above directly after
 *     ```wp-block-code
       /* Add any custom values between this line and the “stop editing” line. */
       ```
   
 * add. And adapt the domain in these lines to your URL – including https.
 *  Thread Starter [qneo](https://wordpress.org/support/users/qneo/)
 * (@qneo)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/#post-17811489)
 * Okay, I know what’s wrong now.
 * I use nginx proxy to redirect traffic to my docker container where I have apache&
   wordpress. When I visit the site without using a proxy, the page looks as it 
   should.
 * I guess I’m doing something wrong in my proxy_pass, but I don’t know what? After
   all, the page shows that https is enabled.
 * NGINX:
 *     ```wp-block-code
       server {    listen 443 ssl;    server_name site-1.mydomain.com;    ssl_certificate /ssl/mydomain.com/fullchain1.pem;    ssl_certificate_key /ssl/mydomain.com/privkey1.pem;    location / {        proxy_pass http://6664bcef9f967204f6096cad_webserver:80;        proxy_set_header Host $host;        proxy_set_header X-Real-IP $remote_addr;    }}
       ```
   
 * APACHE:
 *     ```wp-block-code
       <VirtualHost *:80>    ServerName site-1.mydomain.com    DocumentRoot /user/site/</VirtualHost><VirtualHost *:443>    ServerName site-1.mydomain.com    DocumentRoot /user/site/</VirtualHost>
       ```
   
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/#post-17811492)
 * The server-side configuration is not actually the subject of this forum. I would
   recommend that you contact a community that has more insight into this. However,
   I quickly found a post that describes exactly what is happening to you – and 
   you may find a solution there: [https://stackoverflow.com/questions/57877915/cant-get-nginx-reverse-proxy-to-load-css-images-of-web-application](https://stackoverflow.com/questions/57877915/cant-get-nginx-reverse-proxy-to-load-css-images-of-web-application)
 *  Thread Starter [qneo](https://wordpress.org/support/users/qneo/)
 * (@qneo)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/#post-17812017)
 * Thanks guys, it’s solved now
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/#post-17812020)
 * Great if it is working now. You are welcome to set the topic to solved.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘WordPress installation under HTTPS’ is closed to new replies.

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)
 * [WordPress](https://wordpress.org/support/topic-tag/wordpress/)
 * [wp-admin](https://wordpress.org/support/topic-tag/wp-admin/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 9 replies
 * 3 participants
 * Last reply from: [threadi](https://wordpress.org/support/users/threadi/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-installation-under-https/#post-17812020)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
