I want to change WordPress Address (URL) and Site Address (URL). after a few experiments unfortunately using wp-admin or even changing it on phpmyadmin wordpress cannot be accessed.
What I have tried:
1. I try to change the URL in the general settings of the wordpress is still redirecting to the old url & page 404 not found.
- Then I try in the same config.php it can’t be 404
I change it in phpmyadmin (db) in the same wp_option it can’t.
-
Please help, thanks, in advance
I want to change the url as follows:
https://example.com/spm to https://example.com/
2
Answers
Thank You everyone, my issue solve finally. the problem is my wordpress in subfolder on host. so when i want to change for example to root url or something else.
There are several ways to do this:-
Edit wp-config.php
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.OR
Change WordPress URL Directly in Database
In phpMyAdmin, click on your database on the left-hand side. Then scroll down and click on the wp_options table. If your database has a different prefix it might be named slightly different, such as wp56_options.