Problem with url moving site from subdomain to main domain in Wordpress - wordpress

Guys, I've a site that was moved from to To do this I used Backupbuddy plugin in Wordpress. The problem is..Everytime any user try to access to some old page url ( and the page doesn't exist, are being redirected to where the page previously existed.
Any idea how to fix this?
Thank you.

you have to make change in your .htaccess file in your server or host. always redirects are in that file. if you are using cpanel you have to make visible hidden items in settings.

I think the first port of call would be to check the URL in Wordpress matches the database table URL, if so update the Permalinks and retest.

Zip .htaccess to make a backup and remove the .htaccess file. Then, save your permalink again to generate a new .htaccess and check.


domain redirecting to localhost/wordpress

this is my first time, I am installing a wodrpress localhost(xampp) to main server.
According to tutorial I Imported database from local machine to main server. Changed the the table prefix and http://localhost/wordpress to
after installing theme domain shows empty theme.
I changed all the http://localhost/wordpress used on theme. But didn't work.
Then according to another tutorial I imported full localhost wordpress file.
Then It redirecting my domain to http://localhost/wp-wordpress. Then I decided to fully reinstall the wordpress and as per I removed file from public html which I uploaded.
Now my domain redirecting to http://localhost/wp-wordpress after removing files I uploaded.Public html folder
my site
After reinstalling wordpress on server admin dashboard working fine but domain redirecting to localhost/wp-wordpress
You can change the url many ways in wordpress. You can use to change the url as you understand and follow the steps as I mentioned in below,
Change WordPress URL in Admin Dashboard
Change WordPress URL in wp-config.php File
Change WordPress URL Directly in Database
Change WordPress URL With WP-CLI
Get More understanding the details, Follow the article - How to Change Your WordPress URL
After checking wp-config.php and site_url,home_url in wp_options table in database. Take a view on .htaccess file too. This file should look like this htaccess code
Please change the site_url from the wp_option table. There are 2 rows containing the website base url in the wp_option table. You need to change both url to the main domain url.
Thank you

301 redirect error with wordpress and apache

I've recently migrated a database from windows using bitnami (apache and wordpress) to a linux server (apache and wordpress). I'm able to access the website wp-admin, but every time I try to access the main site it repeatedly returns 301 errors.
I've tried disabling the .htaccess file (deleting, commenting everything out), but it still gets directed. I've disabled all plugins. I've looked into the themes I'm using but they don't have redirect url's like I've seen in other posts.
I'm wondering if the issue might be in how bitnami structures itself. the main documents are stored in website/wordpress/htdocs, whereas linux wordpress seems to store it directly in wordpress.
I've set sites-enabled home directory to
I've also set the wordpress address and site address to
What do I need to do to prevent the redirects, or set it up to work correctly?
if you haven't change your Site URL then.
Please change the Site URL and Home URL from database in wp_option table.
You need to mention new url in both section..
I had a trailing / on my siteurl which led to it not working. After removing that it worked.

Change WordPress URL folder name to another without redirecting

I'm trying to change my WordPress site's URL (without redirecting) from:
Also, if my wordpress site is located in the /go/ folder, is it possible for me to trim /go/ ?
Thank you.
These are two separate issues.
Regarding the first issue, are you saying that you still want a user
to type in, but be served the file from without changing the url? You can install the
wordpress redirection plugin to do that. You can create a 'pass
through' redirect which will do this.
Here's what you can do to run from a wordpress install
in the go subdirectory:

Redirecting old permalink structure to the new one

I had a wordpress site installed in a sub folder with category/post-title permalink structure, which resulted in the following url structure
However as I needed to move my site to the root folder and changed the permalink structure to year/month/post-title, which looks like below, users who visit my website through the links published on other websites see 404 error page as expected.
While doing the changes, moving wordpress to the root directory and changing permalink structure, I forgot to take into account that such problem could occur. Anyway, I made a mistake and now I'm trying to fix the problem.
I wonder is there a way to redirect the old urls to the new ones? Editing .htaccess or using a plugin or something else. The method doesn't matter at this stage. All I want is to solve the problem
Any help?
Thanks in advance.
Use WordPress › Redirection « WordPress Plugins, which will 301 redirect, import a csv of redirects and log 404s without having to deal with mod_rewrite and .htaccess.
mod_rewrite is what you're looking for, if you have that kind of access to your server.
If you're using Apache, mod_alias or mod_rewrite should be the way to go. If you're using IIS, you'll need different solutions based upon whether you're on IIS 6.x or IIS 7.x.

custom 404 error page after moving wordpress from one host to other

I own a website say using wordpress. I have to transfer the wordpress site + content +everything to a new host..
Make a note that I am not moving to different domain name. I am just changing my host .
I have copied the sql data wp files n contents to new host.
When I try to open the site in new host I am getting the custom 404 error page .. its not the default 404 page its the custom one so I guess the wordpress is fine. all the links are directed to my old host because I have not changed my domain name to new host. I planned to make the dns change once the new host Works fine...
What is the reason for the custom 404 page ? How to resolve. ?
Try reesetting your permalinks: You must not have moved your .htaccess file over to the new host or need to regenerate it.
But you may also need to change URLs in the database from the old domain to the new IP/~username. See
Found a solution to the problem here
If the problem remains, please use Ctrl+F5 to refresh your browser cache. Please make sure your permalinks in settings are using the same pattern.