0 %

Change host DB URL Update Wordpress ( No Plugins )

Change host DB URL Update Wordpress ( No Plugins )

Do you want to update URLs after moving your WordPress site? It can be quite painful to manually edit each post or page just to replace old URLs. In this article, we will show you how to easily update URLs when moving your WordPress site.

Step 1 :  Login to your database

Step 2 : Select database -> SQL

Step 3 : Copy code below and

+ replace yourprefix_ to your database prefix

+ http://old-domain.com to your old domain

+ http://new-domain.com to your new domain

UPDATE `yourprefix_options`
SET option_value = REPLACE(option_value, 'http://old-domain.com', 'http://new-domain.com');


UPDATE `yourprefix_postmeta`
SET meta_value = REPLACE(meta_value, 'http://old-domain.com', 'http://new-domain.com');


UPDATE `yourprefix_posts`
SET post_content = REPLACE(post_content, 'http://old-domain.com', 'http://new-domain.com');


UPDATE `yourprefix_posts`
SET guid = REPLACE(guid, 'http://old-domain.com', 'http://new-domain.com');
Việt Lâm Coder

Việt Lâm Coder

Senior Fullstack & System Architect

Cần hỗ trợ website? Gọi / Zalo 0944.71.4545.

Trao đổi về dự án của bạn!

VietLamCoder CMS — Nền Tảng Quản Trị Flat-File Siêu Tốc LamWeb.com.vn — Hệ Sinh Thái Thiết Kế Web & Kho Giao Diện 2026