skip to Main Content

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.

  1. 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.

  1. Please help, thanks, in advance

    I want to change the url as follows:
    https://example.com/spm to https://example.com/

2

Answers


  1. Chosen as BEST ANSWER

    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.

    1. Move the root wordpress to public html
    2. Move the wordpress file to Public html

  2. 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.

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

    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.

    enter image description here

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search