Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Shiyang Lin
Shiyang Lin
2,599 Points

I messed up - How can I "restart" my wordpress site?

I was following along the Wordpress tutorial here and things were going swimmingly. I managed to create a SQL database on the live website and FTP via Filezilla and got everything working.

The problem arose when I was just trying to make the local development the version I like, and then I tried to re-follow the steps to FTP the files into the live site. So I...

  • tried to copy ALL my "localwp.com" files into the public_html folder again (just like I did previously for the first time)
  • I got some errors, so i thought maybe i need to re-export my local SQL again and import it on my live's website cPanel. Got nowhere - it says there is an error because the file is already there. I have since deleted my database and recreated a new one (same database name and user name)
  • I found out that I needed to modify my wp-config file in the live portion of Filezilla to my live website's database. This fixed the problem of "Error connecting to Database"....

But now i am stuck with an annoying HTTP 500 Error. Any idea what could be the problem? This is getting very frustrating - if there is no straightforward fix, how can I get a fresh start on this? :(

Thank you very much in advance!

2 Answers

Konrad Traczyk
Konrad Traczyk
22,287 Points

Hi Shiyang Lin,

Have you changed the links in your sql file? That's what happens when you don't do that. You could do that with find and replace function in any text editor. So replace your local URL with your live URL, then import the datebase from sql file.

Alternate(simpler) way:

  1. Prepare clean WordPress site(wipe your wordpress database, reupload clean wordpress, and install it).
  2. Install All-in-One WP Migration Plugin on both local and live versions
  3. Export your local version then import it to live version, after that you'll be logged out and you're gonna need your admin credentials from local site.
  4. Install Go Live Update URLS Plugin on your live site, find and replace your urls in database.
  5. Go to permalinks settings, and just save them.
  6. Delete both plugins, you dont need them anymore.
  7. Enjoy your live WordPress site.

Hopes it helps.

Konrad

Shiyang Lin
Shiyang Lin
2,599 Points

Thank you!

I managed to get it to work again - by deleting all the files in public_html, re-uploading all my local content files and reconfiguring my wp-config to apply the live server's information. (Sorry to be so detailed - it's for my own reference in the future :P)

Just wondering if this is the best way to transfer my local development into the live website going forward as well?

Konrad Traczyk
Konrad Traczyk
22,287 Points

IMO Plugin migration is good only at the first time(you probably figured that out), but for future development i suggest get(find in google) ftp plugin for your text editor, or maybe you have such functionality already. The point is to make upload process being binded to shortcut keys in your text editor, then it gets super fast to upload your project. Anyway when i have to transfer my whole project from local to live, i always do the above steps as i believe is the fastest and simplest way to achive this.