“Zmień adres URL WordPress” Kod odpowiedzi

WP-config Zmień URL WP-CONFIG

define('WP_HOME','http://example.com'); 
define('WP_SITEURL','http://example.com');
Cautious Caterpillar

WordPress Zmień adres witryny

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

WordPress Zmień adres URL w bazie danych

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
Thoughtful Termite

Zdefiniuj adres URL WordPress

//It is possible to set the site URL manually in the wp-config.php file.

//Add these two lines to your wp-config.php, where “example.com” is the correct location of your site.

define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );

//Important! Do not leave this code in the functions.php file. Remove them after the site is up and running again.

update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );
Usama Ashraf

Zmień adres URL WordPress

/*
This is the safer way to do it.
Upload this file to your active theme directory. 
Use your own URL instead of example.com, obviously.
Refresh in http://example.com/wp-login.php after adding/updating functions.php
Remove the lines or the remove the file after the site is up and running again.

more information here: https://wordpress.org/support/article/changing-the-site-url/#edit-functions-php
*/


update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );
edison quinones

Odpowiedzi podobne do “Zmień adres URL WordPress”

Pytania podobne do “Zmień adres URL WordPress”

Więcej pokrewnych odpowiedzi na “Zmień adres URL WordPress” w PHP

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu