简体   繁体   English

WordPress迁移无法在实时站点上运行

[英]Wordpress migration not working on live site

I had a local wordpress instalation on my system . 我在系统上安装了本地Wordpress。 In my system's /etc/hosts file I have an entry for my website 127.0.0.1 mysite.com 在系统的/ etc / hosts文件中,我的网站127.0.0.1 mysite.com有一个条目

My website is working fine on my local machine . 我的网站在我的本地计算机上运行良好。 But the moment i deployed it to online server its dashboard is not working as expected . 但是,当我将其部署到在线服务器时,其仪表板无法正常工作。 Problems am facing are : -- edit page is not opening -- not able to open theme custmisation page -- not able to install any new plugin -- many more as i start to work on dashbord . 面临的问题是:–编辑页面无法打开–无法打开主题自定义页面–无法安装任何新插件–随着我开始在dashbord上工作,还有更多问题。

I had gone through this link : http://codex.wordpress.org/Moving_WordPress but it didnot woked for me . 我已经浏览了以下链接: http ://codex.wordpress.org/Moving_WordPress,但它对我没有影响。

I also used search and replace db ( http://interconnectit.com/124/search-and-replace-for-wordpress-databases/ ) but it also dont work . 我还使用了搜索和替换db( http://interconnectit.com/124/search-and-replace-for-wordpress-databases/ ),但是它也不起作用。 Because there is not a single string in my whole db which points to localhost . 因为在我的整个数据库中没有一个字符串指向localhost。

My question is what am doing wrong . 我的问题是出了什么问题。 Am not able to figure out how can it work on my system but cannot work in live environment even if every thing is same ( even the url ). 无法弄清楚它如何在我的系统上工作,但即使每件事都一样(甚至是url),也无法在实时环境中工作。 Am trying to fix this issue from last 10 days but with no success . 我试图从最近10天开始解决此问题,但没有成功。

And one more thing i would like to add is that frontened is working perfectly without any flaws on live site . 我还要补充的一件事是,fronted可以完美地运行,而在现场站点上没有任何缺陷。 Only issues am facing are with wordpress dashboard . WordPress仪表板只是面临的问题。

Here is how I do it: 这是我的方法:

  1. Export full database to sql file from localhost. 从本地主机将完整数据库导出到sql文件。
  2. Open sql file with some text editor and replace all occurencies of localhost with your domain name. 使用某些文本编辑器打开sql文件,并将所有localhost的出现都替换为您的域名。
  3. Copy all your website files to FTP. 将所有网站文件复制到FTP。
  4. Import your previously exported and edited sql file. 导入您以前导出和编辑的sql文件。
  5. Change credentials in wp-config.php 更改wp-config.php中的凭据
  6. Edit URL's in .htaccess to match your domain (replace localhost with your domain name) 编辑.htaccess中的URL以匹配您的域(将localhost替换为您的域名)
  1. import Local Database to online server. 将本地数据库导入在线服务器。

  2. change the config file and make a connection to the online server. 更改配置文件并连接到在线服务器。

  3. last most important point. 最后最重要的一点。 check the below link and click this link/button (Problems? Try v 2.1.0 STABLE) for downlode a file for replace a all local site link from the database. 检查下面的链接,然后单击此链接/按钮(问题?尝试v 2.1.0 STABLE)查找文件,以替换数据库中的所有本地站点链接。

link 链接

After downloading this file please put this file into root of the server and execute/run this file and replace local sever path to online server path. 下载此文件后,请将该文件放入服务器的根目录并执行/运行此文件,并将本地服务器路径替换为联机服务器路径。

and last check the database table wp_options field (option_name = siteurl). 最后检查数据库表wp_options字段(option_name = siteurl)。 if site url is change then your site is working fine on the online server... 如果站点URL更改,则您的站点在联机服务器上可以正常工作...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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