0

I have big gaps in my knowledge and right now I know I'm doing things wrong, and I want to buckle down and fix that.

I have a wordpress site using the "shape" theme, and I directly edited the code in the theme to make it do what I wanted it to do, and whenever I edit the code I'm doing it from the editor in my wordpress dashboard as it's live on the internet.

I know that's wrong. From what I've read the right way to do things is to have my site on my localhost, edit it there, and then transfer the files to my hosting server so it's only live onthe internet when the changes are made exactly how I want them to be made.

Also I've heard that I should be editing the theme as a child theme and I'm pretty sure I'm not doing that because I don't understand how that works.

I don't know how to run wordpress from my localhost, I don't know what a child theme is or how to use one, and I don't know how to transfer files to my hosting server. Can somebody point me in the right direction, please?

Thanks!

Edit: and I definitely don't want to lose any content, media, or files from the site the way it is right now in the process. That's why I've been reluctant to dive into changing things to the localhost child theme FTP stuff, but I know I need to.

1

You've got a few hefty questions there so I'll point you in the right direction.

  1. Run wordpress locally. You need MAMP (for mac) or WAMP (for windows). It'll work just like your live site but the files will be on your computer. More info: https://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP

  2. Make a child theme for your site. This will allow you to make edits to your theme without changing the actual main files of your theme. It's just safer. You never want to change the original. That way your changes will be safe through updates and plenty other upsides. You can just google "child themes wordpress" to get Wordpress's instructions on this.

  3. And finally, being able to do these first two steps in a way that lets you elegantly push your changes to your live site - Basically, you need to make a git repository. A git repo is a central place for you to store all of your files. It'll track every change you make and it simplifies updating files across multiple locations (in your case your local machine and your server). It's not as complicated as it sounds but it will take a bit to figure it out. Here's more info: https://wordpress.org/support/topic/working-locally-and-pushing-to-remote-server

Just so you know, it's great that you're wanting to do this the right way. The way I briefly outlined above is definitely the way many professionals do it, so if you can get all this working you will be set!

6
  • Thanks so much! I'm gonna start reading the links right now. – 4514 Nov 4 '15 at 5:51
  • I'm still working on the child theme thing, the first go-around failed. – 4514 Nov 4 '15 at 7:00
  • I'm confused about committing changes using command line. Does that mean I create a post in wordpress dashboard, that changes some stuff inside the wordpress content folder on my machine, then I commit the change using command line and that sends all of my files to github (my git repo), then I have to do something in github to send the files to my actual hosting server to make it go live on the internet? – 4514 Nov 4 '15 at 7:07
  • I went through the links you gave and I completely didn't understand most of the stuff about git repositories and using openSSH to do stuff, but I kept chasing links and wound up on this tutorial and is this still what you're talking about doing? lifehacker.com/5983680/how-the-heck-do-i-use-github – 4514 Nov 4 '15 at 7:08
  • Yes, that's what I'm talking about. That tutorial looks a bit confusing though with the authentication section. You could look at this one too: readwrite.com/2013/09/30/… – user2012167 Nov 4 '15 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.