我将我的Wordpress文件和数据库传输到另一个主机,但是当我更改wp-config.php中的站点URL时,站点URL发生了更改,必须清除浏览缓存,直到它起作用为止,但是仍然要上传URL路径还是旧的URL,如何解决此问题
[wp-config
文件是这样的:
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
* * MySQL settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://codex.wordpress.org/Editing_wp-config.php
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'nezamiyeh_h2' );
/** MySQL database username */
define( 'DB_USER', 'nezamiyeh_h2' );
/** MySQL database password */
define( 'DB_PASSWORD', 'Brcw67Tl;8LF' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );
/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8mb4' );
/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define( 'AUTH_KEY', 'EBYQyZ)/H4j[T6yjpj7#ST|H(ivAB bn?@[xkQ}O*U^tfQFB[U9OV]gCMoUdZp=4' );
define( 'SECURE_AUTH_KEY', 'bj=V@EgRB>sTyVE){+vZ!`;MO$;2[Uo]<>)cs/0Chd1}yH:Taq7-T9c,|XNGfY<(' );
define( 'LOGGED_IN_KEY', 'nPqd[(_eJJ|BNiOTE:Nv{@>+|%O2[W&!F%zA:<@5hJ#4bI-g71~_?v%:2gs(zsBc' );
define( 'NONCE_KEY', 'r 9]?6PgU:%C Pb5,|mt<TbeEDGaQ0r7MNpSGmd/qddi~am+@C)@GA|l,]J>3[<`' );
define( 'AUTH_SALT', '[email protected]%2Fhl?RI0RSH[mBTi<Uj<ikUmH4ey2%tnoOD@8,h-NQ=q_[NE2HdAz92' );
define( 'SECURE_AUTH_SALT', 'SK*>8C%Z3A3]^ZbDL%Z61cX):Qn}R?&$v&@UmLVt$wwv^<CH#76zK,8W=d&V=U~*' );
define( 'LOGGED_IN_SALT', '=X6h5<%loT0RW5!`H,>/h.`mATAzUQO3c*EM+Xs|oGwY[o!t|8x?@M1PI>*p8Dc)' );
define( 'NONCE_SALT', 'aSSmdq};`OX<TNAmGDnBB &whCXH=4=2&(9r>+`58=7fP@>hE`O(2vFc)Pby[5$b' );
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_nezamiyeh';
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the Codex.
*
* @link https://codex.wordpress.org/Debugging_in_WordPress
*/
define( 'WP_DEBUG', false );
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}
/** Sets up WordPress vars and included files. */
require_once( ABSPATH . 'wp-settings.php' );
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_HOME', 'http://nezamiyeh.com' );
define( 'WP_SITEURL', 'http://nezamiyeh.com' );
我可以在哪里更改要上传的URL主页路径?
您可以使用phpmyadmin中的sql查询更改URL。>
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');