2.1 Installing WordPress
The first step in our journey is to install WordPress. It’s very simple, as I’ll show you in this lesson.
1.Introduction1 lesson, 01:20
2.Framework Basics2 lessons, 14:38
3.PHP Files16 lessons, 2:08:48
4.Finishing Touches2 lessons, 23:07
5.Conclusion1 lesson, 01:31
2.1 Installing WordPress
Hey, welcome to the first lesson. So before we go into any coding, we need to install WordPress first. Right? And, if you're familiar with WordPress, then you know how to do this. But if you're just a beginner, and are looking to create a framework for WordPress well you're gonna need a working environment. So I recommend you work locally because it's faster and you can also use GitHub for version control, and you can work offline, right? You can go to a coffee shop, which maybe doesn't have an internet connection, and you can work there. So, I'm gonna show you a very quick way to install WordPress locally using MAMP. Now MAMP is an application which is available for both MacOS and Windows that will install a local server and you'll be able to install WordPress on that server. Now, MAMP also has a pro version, which in version three actually has a very simple way of installing WordPress, but I'm gonna show you the old fashion way. I have a version two of MAMP Pro here and as you can see I have a few hosts set up, for example, WordPress38.ms. In my system that stands for WordPress version 3.8.multisite. Which is just a way of saying or showing that this website is a part of a larger system. And what I'm gonna do here is copy this address and then I'm gonna hit this plus button, server name I'm going to call it WordPress39.ms so we're installing the latest version. I'm gonna paste this in and change it to 39. And also I'm gonna create an alias for this which is gonna be called WordPress 39.ms. And before I hit apply, I gotta go into my sites folder, where I host all of my WordPress installs. I am going to create a new folder called WordPress 39.ms. So now I'm gonna go back here. I'm gonna hit Apply. And it's gonna ask me for my password. Hit OK. It's gonna restart the server and you're good to go basically. So let's minimize this. Now, you need to go to wordpress.org, hit on the Download button. And you'll need to download the current version, which at the time of this recording is 391. And I've already downloaded this zip file and I have all it's contents right here, so I'm gonna copy all of them and paste them in my newly created folder. And you can see that we have some files generated by MAMP. But you can go ahead and delete these and paste in the new ones. Now every WordPress installation has a config file, which is this. So, first thing, you gotta rename it wp-config, and then you need to open this in a code editor, and you need to change a couple of things. So, first of all, the database name, we're gonna call this wordpress39. Username and password, in my case, it's root. It's the default user and password. DB_HOST is local host. You need to scroll down. Table prefix, I'm gonna call it WordPress 39. And then WP_DEBUG, I'm gonna set it to true. And that's all you need to do here basically. Okay so we're gonna close this. And now, you got to open MAMP again and you got to click this web start button. And this will take you right here, into your MAMP screen. Now, when working with WordPress, you need to use some kind of database. So, you need to go to phpMyAdmin, you need to go to Databases and you need to create a database with the name that you put in the config file. In my case, it's WordPress3.9 and I went ahead and created this database. But it's very simple, you just type the name here, Create, and you have your database. Now, once you do that you can go ahead and access wordpress3.9.ms. And this works because I've set up the alias of wordpress3.9.ms right here in MAMP. So it works. Now, this is the install screen. It asks you for a site title, so we're just gonna say WordPress 3.9. Username, I'm just gonna say admin. You gotta input your password twice. Your email. And since we're working locally, we're just gonna tick off this check box, allow search engines to index this site. Hit Install WordPress, and now it says that WordPress has been successfully installed. So click on Log In. Admin. And then your password. Log In. And there we go. This is a fresh install of WordPress 3.9. And if we open it, you're gonna see it with it's default theme which is I think 2014. Let's see, yep, active theme is 2014. So there you go, that's how you install WordPress. And now you're ready to begin working on the actual framework. But before you do that, you gotta make up a plan of what files you're gonna need and the order you're gonna use to write them. And I'm gonna show you how to do that in the next lesson.