如何将Wordpress从Mamp推入hostgator [英] How to push wordpress from mamp into hostgator

查看:67
本文介绍了如何将Wordpress从Mamp推入hostgator的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 mamp 上写了一篇博客,想加入 hostgator.我是否必须在hostgator中重新创建所有内容,例如在Hostgator上安装Wordpress .有什么办法可以将我的东西直接推入hostgator而不重做hostgator中的所有内容.需要一些建议..谢谢..

I have done a blog in mamp and would like to push into hostgator. Must i recreate everything in hostgator like Installing Wordpress on Hostgator. Is there any way i could just push my stuff straight into hostgator without redoing everything in hostgator. Need some suggestion.. Thanks..

推荐答案

将本地版本的Wordpress部署到实时服务器非常容易.首先,您是对的,我不会在您的服务器上安装干净的Wordpress副本,然后您将不得不完全重建该网站.

It's quite easy to deploy a local version of Wordpress to a live server. First of all, you are right, I would not bother installing a clean copy of Wordpress on your server, you'd then have to totally rebuild the site.

您需要做的是;

  1. 将所有文件从本地计算机FTP传输到服务器.
  2. 将整个数据库从本地phpmyadmin传输到服务器上的新数据库
  3. 在wp-config.php中更改数据库连接详细信息
  4. 对默认的Wordpress .htaccess进行必要的更改.我的意思是,您的 MAMP 站点可能不在根目录中,但您的实时站点可能会在.如果您设置了SEO永久链接,则可以从重写规则和.htaccess中的基础中删除Mamp子目录.您的主机可能还要求您在此处添加规则(即,指定要使用的PHP版本等).您始终可以使用他们的安装程序来安装Wordpress,以查看他们是否自己添加了任何特殊规则.

到目前为止,一切都很轻松-现在是我的秘诀.将Wordpress数据库从本地开发环境迁移到实际环境可能会非常痛苦,因为Wordpress(以及许多插件/主题开发人员)使用序列化的阵列来存储数据.因此,如果您在数据库上执行查找和替换操作以将旧的url替换为新的url,则将禁用许多设置,例如配置设置和小部件(特别是文本小部件,但是最终需要重新创建很多内容)).

All easy so far - now comes my tip. Moving Wordpress databases from your local development environment to live can be a massive pain because Wordpress (and lots of plugin/theme developers) use serialized arrays to store data. So if you do a find-and-replace on the database to replace your old url with the new one, you will disable lots of things like config settings and widgets (text widgets specifically, but there's loads of stuff you end up having to recreate).

下载此文件;

http://interconnectit.com/124/search-and-replace-for-wordpress-databases/

并将其上传到服务器,然后直接在浏览器中访问它.运行快速表单,并在数据库URL上执行对数组友好的序列化查找和替换.任务完成.祝你好运.

and upload it to the server and access it directly in your browser. Run through the quick form and perform a serialized array-friendly find and replace on your database urls. Job done. Good luck.

这篇关于如何将Wordpress从Mamp推入hostgator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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