M
M
mr_blond972017-04-11 21:25:54
Digital certificates
mr_blond97, 2017-04-11 21:25:54

how to change image url from http to https in wordpress

I connect ssl to wordpress. If the site works on https, then there is a problem of mixed content.
How to change image url from http to https in wordpress?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Site Developer, 2017-04-11
@mr_blond97

Plugin https://ru.wordpress.org/plugins/search-regex/.
Replacing SQL queries directly in the database can cause various problems with the site.
Moreover, it is better to insert images as protocol-independent links.

M
Maxim Portnov, 2017-04-11
@major_kgb

SQL query to the database. Just replace with yours

UPDATE wp_options SET option_value = REPLACE (option_value, 'http://old_domain.ru', 'https://new_domain.ru') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://old_domain.ru', 'https://new_domain.ru');
UPDATE wp_posts SET guid = REPLACE (guid, 'http://old_domain.ru', 'https://new_domain.ru');
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://old_domain.ru','https://new_domain.ru');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question