TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Best way to push locally developed WordPress site to your hosting?

1 点作者 mirza_rizvi超过 1 年前
Hi, I am a semi-technical WordPress user. I have developed a site locally using LocalWP. Now I want to push my site to my shared hosting. What is the simplest way to do this?<p>After searching, I found that you upload the database and wp-content folder to your hosting. And then change the URLs in your WordPress database to your current site. That should do the trick.<p>Do I have to do it manually find and change it?<p>Also another question I have is that, is there any way I can sync my live site and local site with any services or WordPress plugin?<p>Thanks a lot.

1 comment

throwawayassist超过 1 年前
K.I.S.S<p>I use git for this. Google: &#x27;git -- bare&#x27;<p>Use that as a &#x27;hub&#x27; which you can push and pull your code from. Then using a git hook (post-receive). Run a bash script to install modules, run wp-cli (i.e to change urls on prod) and then reset permission in line with best practices (see their docs).<p>Simple, &#x27;free&#x27; and reliable enough Ive done it on real world prod installs many times via Linode.<p>Tip: do not include your creds in the bash script - set the machines env or have a file outside the www scope and source&#x2F;call it instead.<p>#sorryiammobile
评论 #39175156 未加载