domain redirecting to localhost/wordpress - 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 https://example.com.
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
Thanks!

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

Related

WordPress Site URL auto change

I have migrated a WP site from Siteground to another Siteground temporary domain using Siteground migrator. After I migrate that new site auto-redirect back to the old site.
I have updated SITE_URL and HOME from PHPmyAdmin. But after I refresh the new site those records are automatically changing back. Any method to fix this issue?
Try these.
Define the SITE_URL and HOME constants in the wp-config.php file. Changing Site URL
Rename the plugin directory so the plugins are all disabled. Might be something in one of the plugins that are changing the values.
I find SiteGround's KB quite helpful here:
https://www.siteground.com/kb/how_to_configure_wordpress_to_work_with_a_new_domain/
Also, they have a built-in URL search & replace tool in Site Tools WordPress section, which is what you will need most.

i am redirected to another site on successful login

i recently took over a wordpress site that is a sub dormain of an eCommerce site.
i have installed it on my local wamp and i now wish to log into the wordpress dashboard.
the problem is that the once i log in to wordpress it redirects me back to the old site.
i am now trying to work out where the redirect functionality might be located.
i have already changed the base url address in the table wp_options.
within this table i changed both the siteurl and the home.
i also tried changing the wp-config.php file with the new url:
define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');
i would appreciate any ideas on where the redirect functionality might be located.

Change WordPress URL folder name to another without redirecting

I'm trying to change my WordPress site's URL (without redirecting) from:
example.com/go/take/
to:
example.com/go/give/
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 example.com/go/take, but be served the file from
example.com/go/give 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 example.com from a wordpress install
in the go subdirectory:
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

Moving Wordpress site subdirectory errors

I have just moved my testing development subdirectory worpdress installation to my root folder using the WP-Clone plugin.
The problem now is my main site (previously mysite.com ) shows (mysite.com/site) now. and the subdirectory is shwoing in all my links
I have tried going to settings and removed the /site from wordpress URL and Site address URL.
But it broke my site and disabled me from accessing my wp-login.php .
I fixed it by editing my wp-config.php and adding :
define('WP_HOME','https://mysite.com/site');
define('WP_SITEURL','https://mysite.com/site');
and now my website works perfectly. But it still shows mysite.com/site and i am unable to edit my URL and Siteaddress from my wp dashboard anymore.
How do I Remove my website subdirectory (/site) and still have it work and not break my site's themes and all? How do I go about this? Really really appreciate any help! Thanks!
By adding those constants to wp-config.php you're overruling any setting in the database. That's why you can't edit them in the admin panel.
So the first step is to change those constants to:
define('WP_HOME','https://domain.com');
define('WP_SITEURL','https://domain.com');
Then delete your htaccess file. (.htaccess in your root folder).
Once you've done this navigate to http://domain.com/wp-login.php
Login to your site and go to Settings -> Permalinks. Hit save which will regenerate your htaccess file.
Finally you'll need to update existing links. I'd suggest installing a plugin called 'Velvet Blues Update URLs'.

Wordpress 3.0.3. How To Change Main Site

I have moved a WPMu site to a new host, and upgraded to WP 3.0.3. Things are going pretty easy, except the previous website had a different URL as the main website installation. Now that I have moved the install, I don't need the previous URL as the main site but need to make a new URl as the main site. Where do I go about changing this? I've changed the entire database by changing the previous URL to the new URL, and the wp-config is set up correctly with new URL and htaccess has no mention of it. I'm running out of places to look on where to change the URL.
Any advice/help would be greatly appreciated.
Steps to change site URL in Wordpress
Replace new site url with old site url in exported database sql file (use Notepad++ for fast search and replace)
Change site url in wp-config file
Change database information (db name, host, username, password) in wp-config file
Change site url in .htaccess file

Resources