Rashed ete
Rashed ete

Reputation: 13

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 https://example.com.

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

Upvotes: 0

Views: 863

Answers (3)

Syed Imran Ertaza
Syed Imran Ertaza

Reputation: 175

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

Upvotes: 0

Hritik Pandey
Hritik Pandey

Reputation: 959

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

Upvotes: 0

Priyanka Modi
Priyanka Modi

Reputation: 1624

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,

  1. Change WordPress URL in Admin Dashboard
  2. Change WordPress URL in wp-config.php File
  3. Change WordPress URL Directly in Database
  4. Change WordPress URL With WP-CLI

Get More understanding the details, Follow the article - How to Change Your WordPress URL

Thanks!

Upvotes: 0

Related Questions