skip to Main Content

I have a WordPress site and the URL of the site is "http://example.com/example/". I have used WordPress themes and pages to set the website up. But now I want to change this URL to just show the homepage as "http://example.com" and the other site pages as "http://example.com/".

How can I achieve this in my WordPress site?

I want to change this URL to just show the homepage as "http://example.com" and the other site pages as "http://example.com/".

How can I achieve this in my WordPress site?

2

Answers


  1. I think you will find what you need in the documentation,

    https://wordpress.org/documentation/article/changing-the-site-url/

    On the Settings -> General screen in a single site installation of WordPress, there are two fields named “WordPress Address (URL)” and “Site Address (URL)”.
    The “Site Address (URL)” setting is the address you want people to type in their browser to reach your WordPress blog.

    Login or Signup to reply.
  2. you can update wp-config.php with the values

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

    Or update database by options table changes siteUrl and home to your address

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