Search
 
SCRIPT & CODE EXAMPLE
 

SQL

wordpress sql change site url

# Check your table prefix
# Change all the tables 

UPDATE wp_options SET option_value = 
replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' 
OR option_name = 'siteurl';UPDATE wp_posts SET guid = 
replace(guid, 'oldurl.com','newurl.com');
UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com');
Comment

change site url wordpress database

options table
1. siteurl
2. home

######## OR ########

// Add to top of wp-config.php
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
Comment

PREVIOUS NEXT
Code Example
Sql :: how to set an already made tables auto increment in mysql 
Sql :: Find all tables containing column with specified name - MS SQL Server 
Sql :: alter table delete column 
Sql :: how to unlock table in mysql 
Sql :: sql auto update dupdated_at 
Sql :: group_concat length limit 
Sql :: sql error 1175 
Sql :: tsql get beginning of year 
Sql :: add sequence postgres 
Sql :: how to run mysql in git bash 
Sql :: mariadb alter user host 
Sql :: start mysql server mac 
Sql :: grant lock tables privilege mysql 
Sql :: search for tables with name postgresql 
Sql :: generate c# class from sql server table 
Sql :: install mysqldump ubuntu 
Sql :: show all tables in oracle 
Sql :: get table column names sql ssms 
Sql :: mysql left join exists 
Sql :: oracle list invalid password logon denied 
Sql :: postgres get next sequence value 
Sql :: create a table with an id in mysql 
Sql :: sql where last 12 months 
Sql :: mac os zsh: command not found: mysql 
Sql :: laravel to sql 
Sql :: sql delete stored procedure 
Sql :: sql server list user permissions 
Sql :: sql primary key with multiple columns 
Sql :: ALL_TAB_PARTITIONS 
Sql :: add days in oracle sql 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =