简体   繁体   中英

Wordpress - Remove https redirects for media files after moving to localhost

I moved wordpress website with https address to a localhost on LAMP server using All-in-one migrate plugin. Everything moved well except paths to media files (pictures).

Links to pictures in upload folder are broken. And nothing wrong with them except that they have https instead of http.

Console errors pic

I tried find/replace in wp_posts table, but it doesnt find anything. Tried to use plugin, that seems to do the same - doesnt help.

My .htaccess file is the default one from WP codex.

Weird, that I've done same process of migrating from https to localhost with another wordpress website and everything was fine.

The only difference between them, is that website with problem is using woocommerce plugin. And images are actualy products images. Maybe this will help.

There are a few things, that I would recommend you to check.

  1. Check your settings in the database _options table in the fields siteurl and home . You should have there http://domain-name
  2. Also you need to check your wp-config.php . There might be rules added regarding siteurl and home using incorrect protocol.
  3. There might be some plugins installed, which can trigger this https redirect, such as Really Simple SSL , or cache plugins, which also have settings regarding https.
  4. And finally, check your theme code, if it is a custom theme, it also can be configured to use https in some cases.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM