Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,778 members, 7,810,025 topics. Date: Friday, 26 April 2024 at 06:51 PM

How To Remove Localhost From My Site ? - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / How To Remove Localhost From My Site ? (3269 Views)

Help, My Xampp Is Not Showing My Projects On Localhost / Mysql: Cannot Connect To Mysql, Access Denied For Root@localhost (2) (3) (4)

(1) (Reply) (Go Down)

How To Remove Localhost From My Site ? by princejude(m): 6:38pm On Dec 09, 2014
I designed a wordpress site with wamp server on localhost (my PC). The web address on my computer is localhost/mysite . After uploading the site and database to an online server, it is only the home page "www.mysite.com" that is opening. If I click any other page(eg about page), it will display "404 page not found" and the web address in the address will be localhost/mysite/about . But if I put the wamp server online the address with localhost/mysite will open.
Re: How To Remove Localhost From My Site ? by Slyr0x: 6:54pm On Dec 09, 2014
Download the Search and Replace wordpress plugin >> https://wordpress.org/plugins/search-and-replace

Use it to search for localhost and replace with your website URL.

cheers
Re: How To Remove Localhost From My Site ? by FRInteractives: 7:51pm On Dec 09, 2014
The main issue here is either a database clash or links clash here is some things to checkout for and do:

1) Locate your local files ie your wordpress file, find the file named "wp-sample-config.php" or wp-config.php" open it in a text editor find and replace the following strings of codes:
DB_NAME "localhost"
DB_USER "root"
DB_PWD "somepassword"

Replace localhost, root, and password with your own info (get this information from your web server )

2) While running your local server eg wampp, xampp, etc, open phpmyadmin to access your SQL Database (make sure your local server has phpmyadmin installed) open your SQL Database, open the Wordpress Database and export it as an sql file. The create a similar database with the same database name and import the database tables you exported. Test your site again if you still have issues drop it as a comment here or reach us on
Whatsapp or call: 2348072611343, BBM: 31076DE9

Thanks
Re: How To Remove Localhost From My Site ? by bedfordng(m): 8:37pm On Dec 09, 2014
probably you did not do the necessary adjustment on the wp config file.there are changes you should have done before transfering it to your live host
Re: How To Remove Localhost From My Site ? by muid33n(m): 1:16am On Dec 17, 2014
FRInteractives:
The main issue here is either a database clash or links clash here is some things to checkout for and do:

1) Locate your local files ie your wordpress file, find the file named "wp-sample-config.php" or wp-config.php" open it in a text editor find and replace the following strings of codes:
DB_NAME "localhost"
DB_USER "root"
DB_PWD "somepassword"

Replace localhost, root, and password with your own info (get this information from your web server )

2) While running your local server eg wampp, xampp, etc, open phpmyadmin to access your SQL Database (make sure your local server has phpmyadmin installed) open your SQL Database, open the Wordpress Database and export it as an sql file. The create a similar database with the same database name and import the database tables you exported. Test your site again if you still have issues drop it as a comment here or reach us on
Whatsapp or call: 2348072611343, BBM: 31076DE9

Thanks





After doing all that as stated above, you need to do one more thing:

From the wp dashboard, change the permalink of your site to the %Post%. This will solve the issue of error 404
Re: How To Remove Localhost From My Site ? by maekhel(m): 10:53am On Dec 17, 2014
princejude:
I designed a wordpress site with wamp server on localhost (my PC). The web address on my computer is localhost/mysite . After uploading the site and database to an online server, it is only the home page "www.mysite.com" that is opening. If I click any other page(eg about page), it will display "404 page not found" and the web address in the address will be localhost/mysite/about . But if I put the wamp server online the address with localhost/mysite will open.
To solve this, go to phpMyAdmin on ur live server, click on your database name and then click on SQL from the top menu, then paste the query below in it.

UPDATE wp_post SET post_content=REPLACE(post_content, 'localhost/mysite', 'www.yoursite.com');
Remember to change www.yoursite.com with yor actual site URL.
courtesy: http://tutorialslodge.com/how-to-move-a-local-wordpress-blog-to-a-live-server/
Re: How To Remove Localhost From My Site ? by princejude(m): 11:44am On Dec 17, 2014
Thanks for all your wonderful contributions, the issue has been resolved, the site is online now. Check out the site www.jutronix.com and also comment on the design because I will like to here some professional advice and suggestions from our able webmasters here.

(1) (Reply)

9jaflaver Blogger Template 2.0.1 By Olawande / How To Write Great Blog Posts Headlines That Drive Traffic / Does Your Blog Have An RSS Feed? Post It Here.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 17
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.