简体   繁体   中英

wordpress “path to 'Home' points to localhost”

Main issue. When I click on the 'Home' tab on the Wordpress site, it points to localhost.

Troubleshooting steps already taken. 1. From cpanel >phpmyadmin > database > wp_options:

In MySQL wp_options

Siteurl shareyourpeace2.info/projectPortfolioDecember
Home shareyourpeace2.info/projectPortfolioDecember

2. WordPress Dashboard

Settings > general >
Wordpress address(URL) shareyourpeace2.info/projectPortfolioDecember
Site Address (URL) shareyourpeace2.info/projectPortfolioDecember/

3. WordPress Dashboard

Settings > reading >

Front page displays your last posts

What happened. I developed locally and I uploaded my final site to my Remote Host. I wanted to do some housekeeping to remove unnecessary pages and posts. I did this while logged into

shareyourpeace2.info/projectPortfolioDecember

and from the dashboard.

I believe that I renamed a page - maybe the one called 'front' to 'about' but I do not think that matters. Now when I click on the HOME TAB, the url points to

http://localhost:8888/projectPortfolioDecember/

and the browser error is

"This Website is not available."

To troubleshoot, I compared two sites below, both of which have the HOME TAB.

This first site was a learning site.

http://shareyourpeace2.info/projectPortfolio

If you click on any Tab and then click on the HOME TAB to return, it works.

Inspect Element > <a href="http://www.shareyourpeace2.info/projectPortfolio/">Home</a>

This is my final site.

http://shareyourpeace2.info/projectPortfolioDecember/

If you click on any Tab and then click on the HOME TAB , it says'

Inspect Element >
<a href="http://localhost:8888/projectPortfolioDecember/" onclick="__gaTracker('send', 'event', 'outbound-widget', 'http://localhost:8888/projectPortfolioDecember/', 'Home');">Home</a>

[imgur link that shows the above two screen side by side][1]

![enter image description here][1]

Here is the link to the image on imgur.

http://imgur.com/delete/n2A8WL3NTlPn8kx

I cannot find the file or code to fix this ? Please help ?

notes. I have manually looked everywhere in the code. I understand a lot of theme development - the php, mysql, configuration .... When I look at all of my pages from the wordpress dashboard, I never see a 'home page' or the page that would be the index.php. When I look in all of the .php file from my IDE I cannot find the code where the path to 'home' or index.php is defined. And within the database, the siteurl and home are set to this path:

shareyourpeace2.info/projectPortfolioDecember  (no ending slash)

You need to also update the guid values for every page and post in the wp-posts table. You can do this with an REPLACE command in phpMyAdmin:

UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');

See this post for more info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM