Website in wordpress redirects to old URL after migration

后端 未结 7 804
离开以前
离开以前 2021-02-05 04:55

I had never done migrating a site on wordpress, I\'ll put step by step how I did, need to put the site on a new domain that are on the same server, so only the migrated files, t

7条回答
  •  故里飘歌
    2021-02-05 05:17

    I've solved my issue with my solution at No# 04 See below what I tried:

    1- Make sure Database wp_option links are set

    /* MySQL: */
    update wp_options set option_value = 'http://example.com' where option_name = 'siteurl';
    update wp_options set option_value = 'http://example.com' where option_name = 'home';
    

    2- Additionally define url in wp-config.php file

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

    3- Clear cache of from server

    4- Clear your browser cache & history (Hurray!!! it solved my issue no redirection)

    On Chrome, Navigate to chrome://settings/clearBrowserData and clear image and file cache.

提交回复
热议问题