问题
I will be really thankfull for any help, because After reading and trying a lot of tutorials, i have not found any solution. After i change domain name from www.examlpe.fr to www.newExample.fr, i have only the home page works successfully but others links returns 404 not found error. I try to manage this with Permalinks, i found only the default permalink works.
in wp_config i set:
define( 'WP_HOME', 'http://newExample.fr' );
define( 'WP_SITEURL', 'http://newExample.fr' );
Also in functions.php i set:
update_option( 'siteurl', 'http://newExample.fr' );
update_option( 'home', 'http://newExample.fr' );
my .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
In addition, i try to update .htaccess(to make an old one and to create a blank one) file and edit permissions while editing primalinks
Also i have change in mysite.conf to replace AllowOverride None --> AllowOverride All
thank you in advance for your help
回答1:
Do you have access to your WordPress dashboard? If so try to go there under settings -> permalinks just open that page and press save once. After that your sites should work.
回答2:
For 4 years I use Search-Replace-DB to fix that kind of issues. Wordpress keep in your DB the old urls. First you need to download and read the README Search-Replace-DB
Try follow the next step:
1- Copy the whole folder inside your wordpress site. I assume you download or clone the previously repository link.
mv Search-Replace-DB /my/web/site
2- open a browser and go to mydomain.com/Search-Replace-DB
You will get a dashboard very nice, its very intuitive.
回答3:
it's resolved i'm sure from the beginnig that was the activation of rewrite rules from my server center.
来源:https://stackoverflow.com/questions/58973585/after-changing-domain-name-of-wordpress-site-only-default-permalinks-working-wor