• Home
  • Contact

Carlos Sura

Linux, Mail, Servers, Postfix, Interspire, PHP, PowerMTA

wordpress

Change WordPress URLs in MySQL

June 19, 2017 by Carlos Sura Leave a Comment

When a site development is ready -made with WordPress-  you will have to change the URL’s on the database, the easiest and quickest way would be following these steps:

MySQL
1
2
3
4
5
6
# Remember to change wp_ if your table prefix is different.
UPDATE wp_posts SET post_content = REPLACE(post_content, 'domain.com', 'newdomain.com');
UPDATE wp_options SET option_value = replace(option_value, 'http://domain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://domain.com','http://newdomain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://domain.com', 'http://newdomain.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://domain.com', 'http://newdomain.com');

 

Posted in: CMS, Wordpress Tagged: domain, mysql, update, url, wordpress

Frase del Día

ADS

ADS

Domain Registrations from just $3.98/Year

ADS

Ads

HideMyAss.com

Etiquetas / Tags

amazon apache backup base de datos bash bind cambiar centos clave database ehlo error folder gentoo hostname http ips lamp linux local mail multiples mysql password perl php postfix redHat redireccion redirect respaldo rhel rhel7 root script sql ssl suexec timezone ubuntu vsftpd webmail windows yahoo zona horaria

Copyright © 2018 Carlos Sura.

Omega WordPress Theme by ThemeHall