43
votes
Accepted
How do I disable responsive images in WP 4.4?
Here are few things you could try to remove the responsive image support in 4.4:
/**
* Disable responsive image support (test!)
*/
// Clean the up the image from wp_get_attachment_image()
...
26
votes
Accepted
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 ...
15
votes
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 ...
14
votes
HTTPS leads to Sorry, you are not allowed to access this page
Just a quick note, the code
define('FORCE_SSL_ADMIN', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on';
need to be at the top of the config file just after the <...
13
votes
How do I disable responsive images in WP 4.4?
The simplest and cleanest way to do this is simply this:
add_filter( 'wp_calculate_image_srcset', '__return_false' );
To echo what most other folks are saying though, srcset is a good idea and is ...
12
votes
Accepted
Switch from https back to http
You can try these:
1. make sure the values changed in database
If you can't login to wp-admin > settings to confirm that, you can go to database, wp_options table and look for siteurl and home ...
11
votes
WordPress in HTTPS, causing Redirect Loops
The answer to this came in part from this answer, which linked to the Codex, advising the following snippet to be placed at the top of the wp-config file:
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO']...
10
votes
Stop WordPress from using HTTPS and just use HTTP
There are 2 things you must do.
If you are using Apache server go to .htaccess and change the Rewrite and RewriteBase engine to
RewriteEngine On
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ ...
8
votes
Accepted
htaccess https redirect from www to non-www
Before I give you the CODE, let me explain a few points:
Point 1:
It's better if you only allow https links. Mixing http & https for the same content breaks the security added by https. With ...
8
votes
Mixed content warnings after changing site adress from HTTP to HTTPS
This is happening because WordPress saves URLs in content absolutely by default (meaning that it's actually got your urls saved as http://example.com in the database). So to fix this you'll want to ...
8
votes
Local version of a Wordpress site - SSL/HTTPS enforced?
WordPress keeps WP_HOME and WP_SITEURL in DB, this is set during initial installation and usually is the domain of your website, in your case it is a domain with https.
Your visiting site via local ...
7
votes
How do I disable responsive images in WP 4.4?
Most likely, the reason the URLs in your srcset attributes are incorrectly showing HTTPS is because the URLs for all images are built using the value of the siteurl option in your wp_options table. If ...
7
votes
Accepted
How to migrate a HTTPS WordPress installation to localhost?
This is because the site_url and homeurl of your original installation are set to HTTPS in the database, so you can't access your website on localhost unless you:
Change these values to non-ssl
...
7
votes
Accepted
Stop WordPress and Plugins from Overwriting .htaccess
If you place your "custom" directives outside of any # BEGIN ... / # END ... comment markers then WordPress (and plugins) should not overwrite them when they update. (Of course, if you have plugins ...
7
votes
Why is WordPress redirecting from http to https on a local environment?
Well, at my situation... I downloaded the company website from production to localhost because I was needed to prepare a development environment for some developers. The production is using https:// ...
7
votes
Accepted
How do I handle SSL properly when WP is behind a reverse proxy?
You can't hook is_ssl() to override the result, and as you've noticed you can't edit WordPress Core itself or your changes will get lost if you're using built-in automatic updates.
So the usual ...
6
votes
Disable SSL / HTTPS for wordpress
You can modify .htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
5
votes
Accepted
Divert http to https with WordPress on IIS
You'll need to update all of the URLs in your database to the HTTPS protocol:
Go and download Interconnect IT's Database Search & Replace Script here
Unzip the file and drop the folder where your ...
5
votes
How do I disable responsive images in WP 4.4?
This will disable the srcset code by eliminating any images wider than 1 pixel.
add_filter( 'max_srcset_image_width', create_function( '', 'return 1;' ) );
In the long run, you should try to fix the ...
5
votes
Force HTTPS using .htaccess - stuck in redirect loop
This is a late answer but this works for me:
Change the RewriteCond to this
RewriteCond %{HTTP:X-Forwarded-Proto} !https
Should be like this:
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto}...
5
votes
Switching MultiSite installation from HTTP to HTTPS
I encountered the same issue: with WordPress multisite, there is no option or setting that defines if a site domain is HTTP or HTTPS. Even after replacing all occurrences in the database, a site ...
5
votes
Why is WordPress redirecting from http to https on a local environment?
Make sure you don't have installed and activated a plugin that forces a redirection to HTTPS, for example, the Really Simple SSL. If you have one, deactivate it on the localhost by renaming the plugin ...
5
votes
Accepted
Wordpress redirect loop on nginx + apache reverse proxy
Issue was caused by nginx serving example.com/index.php while Wordpress was redirecting to example.com/, thus causing a redirect loop.
This is the working config I used to fixed the redirect loop:
...
4
votes
SSL Breaks Wordpress CSS
This type of CSS "breaking" is caused mostly due to accessing files via HTTP request on an HTTPS connection, or to be short, accessing insecure files.
In the provided link, the Registration form is ...
4
votes
Stop WordPress and Plugins from Overwriting .htaccess
Wordpress will definitely rewrite your .htaccess file under certain circumstances, such as if you change Permalinks.
Like you, we have a bunch of custom things in out .htaccess file, which I'd prefer ...
4
votes
Accepted
Redirect to https not working with .htaccess
You've put the code in the wrong place. The HTTP to HTTPS directives must go before the WordPress front-controller, otherwise it's simply never going to get processed for anything other than direct ...
3
votes
How to force static assets with HTTP sources to load over HTTPS?
If you are using AWS Load Balancers with SSL Termination this is what I did:
Assuming you have your AWS ELB configured to do SSL termination and forwarding traffic to your Wordpress Target Group:
On ...
3
votes
How to use Wordpress multisite with mixed HTTP and HTTPS sites?
Thanks to @Sorin for posting the trac. From there I found a solution using just filters in functions.php (so no editing the core)
Thanks @mensmaximus for posting there:
Link: https://core.trac....
3
votes
Stop WordPress from using HTTPS and just use HTTP
There's a couple of factors here.
First of all, you might want to check the site settings in wp_options (or wp_X_options if you're in a multisite setup), especially the value of:
home
siteurl
The ...
3
votes
Load images with http urls inside https post
There is a pre-built tool called Search and Replace (recommended in the WordPress.org codex) that you can use to safely edit your database for just this type of change. Whether you choose to use a ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
https × 322ssl × 135
http × 61
redirect × 59
htaccess × 42
multisite × 22
wp-admin × 17
plugins × 16
migration × 12
urls × 11
admin × 10
login × 10
images × 9
permalinks × 9
database × 9
errors × 9
404-error × 9
subdomains × 9
css × 8
site-url × 8
ajax × 7
jquery × 7
security × 7
links × 7
nginx × 7