WordPress URL ändern und Links anpassen

November 10th, 2015 by Jan Gabriel Leave a reply »

To update WordPress options with the new blog location, use the following SQL command:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';

After that […] fix URLs of the WordPress posts and pages […] stored in database wp_posts table as guid field. […]

UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');

And further on:

Use the following SQL commands [sic!] to fix all internal links […]:

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

Advertisement

Schreibe einen Kommentar