WordPress 从本地主机迁移到实时服务器后,图像未显示错误 [英] Images not showing error after WordPress migration from localhost to live server

查看:26
本文介绍了WordPress 从本地主机迁移到实时服务器后,图像未显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的网站上传到我的服务器.

但是当我调用网站时,它显示了 urllocalhost:8888",并给了我一个错误:

  • 部分图片损坏
  • 某些部件无法正常工作.

网站链接为:

解决方案

主要是您需要正确地将 WordPress 迁移到 Live Server.

尝试右键单击您网站的徽标并在新的水龙头中打开图像:您将获得以下链接:

http://localhost:8888/smartService/wp-content/uploads/2018/04/logo-website-1.png

这意味着您没有正确迁移网站.

简短的回答是,您需要根据图片问题修复站点中的 URL,如果有任何其他错误,还需要做更多工作.

上面的链接应该是这样的:

http://smarts-co.com/wp-content/uploads/2018/04/logo-website-1.png

我会执行以下操作以将站点从本地主机迁移到实时服务器:

方法一:

使用一些插件来迁移 WordPress 网站,从插件目录中挑选您最喜欢的.

方法二:

它的手册,但我喜欢它并且几乎从不失败;如果你尝试过这种方法,你需要知道你在做什么.

  1. 将文件上传到服务器.
  2. 使用 Notepad++,查找并替换所有 http://localhost/http://www.example.com/
  3. 你需要offcourse来修复wp-config.php

方法 3:

您可以尝试一些查找/替换插件来搜索 MySQL 并解决问题.我相信您可能想尝试方法 3,因为您已经从本地主机上传到服务器.

另外请谷歌:(如何将wordpress网站从本地主机上传到cpanel)

注意:这个答案是为了修复上传到实时服务器后不显示的图像,而不是完整的迁移手册.

I uploaded my website to my server.

But when I call the website, it shows the url "localhost:8888", and gives me an error:

  • Some images broken
  • Some parts don't functions properly.

the website link is: www.smarts-co.com

in wp_options table, I did changed the home & siteurl values in MySQL to my site URL, but still getting the error that you get when you click on my website.

解决方案

Mainly you need to properly move WordPress to Live Server.

Try to right click on your site's logo and open image in new tap: You will get the following link:

http://localhost:8888/smartService/wp-content/uploads/2018/04/logo-website-1.png

This means you didn't migrate the site properly.

the short answer is you need to fix the URLs in your site as per images issues and some more work if any additional bug.

The above link should look like:

http://smarts-co.com/wp-content/uploads/2018/04/logo-website-1.png

I would do the following to migrate site from localhost to live server:

Method 1:

Use some plugins to migrate WordPress site, pickup your favorite from Plugins directory.

Method 2:

Its manual but I like it and mostly never fail; you need to know what you are doing though if you tried this method.

  1. Upload files to server.
  2. Using Notepad++, find and replace all http://localhost/ to http://www.example.com/
  3. You need offcourse to fix wp-config.php

Method 3:

You can try some find/replace plugin to search MySQL and fix the issue. I believe you may want to try method 3 as you already uploaded to server from local host.

Also please google: (how to upload wordpress website from localhost to cpanel)

Note: this answer is realated to fixing images not showing after uploading to live server and not a complete manual for migration.

这篇关于WordPress 从本地主机迁移到实时服务器后,图像未显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆