TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

1 pointsby mirza_rizviover 1 year ago
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

throwawayassistover 1 year ago
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 未加载