Tarun Dhiman
Tarun Dhiman

Reputation: 161

Wordress index page redirects to another page

I have change the directory of my wordpress project from

/root/demoweb/web to /root

but index page still redirecting to old one.

I have changed the .htaccess configurations and settings/ general admin settings also.

what should i do ?

Upvotes: 0

Views: 70

Answers (3)

sasha.itman
sasha.itman

Reputation: 1

Database needs changes,follow the steps

  1. first yake full backup before.
  2. open your database, export that.
  3. open with an editor application.
  4. find and replace all of: find all: "old_url" to replace all: "new_url"
  5. save this file.
  6. import the database.

enjoy the website :-)

Upvotes: 0

F3L1X79
F3L1X79

Reputation: 2675

This is the queries I usually perform (of course replace the value old_url and new_url by yours):

UPDATE wp_options SET option_value = replace(option_value, 'old_url', 'new_url') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'old_url', 'new_url');

UPDATE wp_posts SET post_content = replace(post_content, 'old_url', 'new_url');

UPDATE wp_postmeta SET meta_value = replace(meta_value, 'old_url', 'new_url');
  • Then checking if there is a redirect in .htaccess.

  • Then accessing the admin URL by going to my new_url/wp-admin/ and regenerating the permalinks (Settings > Permalinks, and click save changes).

  • Last one: clean your cache if you got a caching plugin or server-module.

Upvotes: 2

Vishal Somaiya
Vishal Somaiya

Reputation: 1

you have to change root path in your apache server file which is apache.conf .

Upvotes: -1

Related Questions