Protocol neutral URLS with wp_enqueue_script (SSL issues)?

You can’t — URLs must have a protocol for WordPress to enqueue them. What you can do, though, is detect which protocol to use and then use that. $protocol = is_ssl() ? ‘https’ : ‘http’; $url = “$protocol://example.com/resource”; But for enqueuing scripts from your theme, you should use get_template_directory_uri() or get_stylesheet_directory_uri() which already handle SSL: … Read more

Multisite Domain Mapping with SSL

A Multi-Domain (UCC) SSL certificate will allow your users to choose their own domain to display. It may be important for you to know that many Certificate Authorities have a limit to the number of certificates that can be issued for a single IP address so if you are running a large network of over … Read more

Use a different domain for SSL

Just to keep things nice & clear, I’ve posted this as a new answer. Let’s reset the playing field & follow the below instructions as if it were a shiny new install (ignore all code & suggestions in previous answers). In your wp-config.php define( ‘WP_SITEURL’, ‘http://www.realdomain.com/blog’ ); define( ‘SSL_DOMAIN_ALIAS’, ‘realdomain.maindomain.net’ ); define( ‘FORCE_SSL_LOGIN’, true ); … Read more

Anyone figured out how to use WordPress MultiSite with Domain Mapping & SSL?

I am using multisite with domain mapping. I chose the CNAME option for pointing the mapped domain name. My site is installed as a sub directory. http:// homesite.org/seedlivelihood Files are served like so: https:// homesite.org/seedlivelihood/wp-content/plugins/woocommerce/assets/css/fancybox.min.css?ver=3.2.1 With domain mapping the site is at: seedlivelihood.org Which is where my SSL is set up to be from. Safari … Read more

Disable SSL / HTTPS for wordpress

Check your wp-config.php file for lines like: define( ‘WP_SITEURL’, ‘https://example.com’ ); define( ‘WP_HOME’, ‘https://example.com’ ); Also check your database’s {prefix}_options table: SELECT * FROM wp_options WHERE option_name=”siteurl” OR option_name=”home”; …assuming that your database’s prefix is wp_.

Setting $_SERVER[‘HTTPS’]=’on’ prevents access to wp-admin

Special thanks to user42826. According to the codex: If WordPress is hosted behind a reverse proxy that provides SSL, but is hosted itself without SSL, these options will initially send any requests into an infinite redirect loop. To avoid this, you may configure WordPress to recognize the HTTP_X_FORWARDED_PROTO header (assuming you have properly configured the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)