John Davidson

php - Wordpress site changed to HTTPS from HTTP after reinstall. And does not see some of the pictures

0 comments
Message:


I changed some files in config sites and my site broke. So I reinstalled wordpress and replace in the new install wp-admin, wp-content, wp-includes with old folders. Used the same database. Now my site is only working on https not on http like it was before and it fails to load certain images and thumbnail. When i am inspecting the page the images have the 404 error and they work when replacing their url from http to https. Is there a general fix for that? What should i do.enter image description here



My Answer:
To fix this issue, you can try the following steps:

1. Update the site URL in the WordPress settings:
- Login to your WordPress admin dashboard.
- Go to Settings > General.
- Update both the WordPress Address (URL) and Site Address (URL) to use HTTPS instead of HTTP.
- Save the changes.

2. Update the URLs in the database:
- Install and activate the "Better Search Replace" plugin.
- Go to Tools > Better Search Replace.
- Enter your old HTTP URL in the "Search for" field and your new HTTPS URL in the "Replace with" field.
- Select all tables.
- Uncheck the "Run as dry run" option.
- Click on "Run Search/Replace" button.

3. Update the URLs in the theme files:
- Open your theme files (e.g., header.php, footer.php) using a code editor.
- Search for any instances of HTTP URLs and replace them with HTTPS URLs.

4. Regenerate thumbnails:
- Install and activate the "Regenerate Thumbnails" plugin.
- Go to Tools > Regenerate Thumbnails.
- Click on the "Regenerate Thumbnails For All Images" button.

5. Clear cache:
- If you are using a caching plugin, clear the cache.
- Clear your browser cache and try accessing the site again.

By following these steps, you should be able to fix the issue of missing images and thumbnails on your WordPress site after changing from HTTP to HTTPS.

Rate this post

5 of 5 based on 5581 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us