How to change WordPress URL HTTP to HTTPS from database

Database, PHP , , 0 Comments

Warning: Trying to access array offset on value of type null in /home/codenski/public_html/wp-content/themes/simple-east/content.php on line 37

When we update database content link without using plugin then many problem generated if we update query without taking backup. In MySQL database we have to use following SQL query for different table.

UPDATE wp_options SET option_value = replace(option_value, 'https://mycodingsolution.com', 'https://mycodingsolution.com') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://mycodingsolution.com','https://mycodingsolution.com');
UPDATE wp_posts SET guid = replace(guid, 'https://mycodingsolution.com','https://mycodingsolution.com');

UPDATE wp_posts SET post_content = replace(post_content, 'https://mycodingsolution.com','https://mycodingsolution.com');

UPDATE wp_posts SET pinged = REPLACE(pinged, 'https://mycodingsolution.com', 'https://mycodingsolution.com')WHERE pinged LIKE '%https://mycodingsolution.com%';

if WordPress page has been made by WP page-bakery or editor then following query must be run


UPDATE wp_posts SET post_content = REPLACE(post_content, 'src="https://mycodingsolution.com', 'src="https://mycodingsolution.com')WHERE post_content LIKE '%src="https://mycodingsolution.com%';

UPDATE wp_posts SET post_content = REPLACE(post_content, "src='https://mycodingsolution.com", "src='https://mycodingsolution.com")WHERE post_content LIKE "%src='https://mycodingsolution.com%";

UPDATE wp_posts SET post_content = REPLACE(post_content, 'href="https://mycodingsolution.com', 'href="https://mycodingsolution.com')WHERE post_content LIKE '%href="https://mycodingsolution.com%';

UPDATE wp_posts SET post_content = REPLACE(post_content, "href='https://mycodingsolution.com", "href='https://mycodingsolution.com")WHERE post_content LIKE "%href='https://mycodingsolution.com%";

Warning: Trying to access array offset on value of type null in /home/codenski/public_html/wp-content/themes/simple-east/content.php on line 74

Leave a Reply

Your email address will not be published.