3. Setting up for WordPress

Share this post on:

Let’s prepare our machines for WordPress development. If you already have things set up and prefer your own kind of environment then you’re free to skip this lecture. If not then just follow along. I’ll try my best to explain everything. The very first thing we need is a development environment. There are various environments out there but the one I recommend is that it’s free and constantly updated with the latest versions of software for web development to download XAMPP. You’ll need to visit the site Apache friends dot org. I’ll provide a link to this site in the resource section of this lecture. Just a side note. Most sites I talk about will be provided in the resource section of each lecture. So just be aware of that. You should see something similar to what I see. XAMPP is a program that bundles various programs together. Let’s take a deeper look at these programs. The very first program is Apache the official Apache site is Apache dawg Apache is actually an Open Source Software Foundation that provides free programs for everyone. One of their most popular programs is the HTTP server program. We can find this program under projects. You’ll find a link to the HDP server project. This program allows you to turn your computer into a server that accepts and sends requests. It’s very lightweight and easy to use. The next piece of software is Mario DB. You can find more information about the software at Maria DB dot org. Maria DP is a database that allows you to store data about anything you want. There are all kinds of databases out there but the most popular choices are either Oracle or my sequel my sequel and Maria TB are the two databases WordPress is 100 percent compatible with. So you may be wondering why are we installing Maria D.B. instead of my sequel. Well, there’s a lot of business politics that I won’t dive too much into because it’s really boring. But here’s the overall gist of it. My sequel has seen very little development in recent years. A lot of developers have decided to force my sequel and continue developing and under a new name which is Maria D.B. balking is just a fancy term for downloading open-source code and then adding onto it essentially. Maria D.B. is my sequel but with more features and is constantly updated. So most code that you write for my sequel will also be compatible with Maria D.B. and vice versa. I promise that all code we write will be compatible with both. Maria D.B. and my sequel The last piece of software is p HP. You can find the official P HP site at the PHP dot net. BHP is the programming language WordPress is built with I assume you already know about BHP so I won’t be talking about it. You’ll notice that Perl is also bundled but we won’t be using Perl at all. So you don’t have to worry about that. The X in Zam stands for Operating System implying that Samp is cross-compatible with all operating systems. All these programs combined together will create an environment you can run on your computer. This environment will allow you to install and work with WordPress locally. There are other environments out there but I highly recommend you use them. I find Sam the easiest to work with out of all the environments available. There are better options out there but those tend to be overkill in the next lecture. I’ll talk about other options and why we won’t be using them for now. Just keep following along with me. Let’s download and install Sam. There are various versions of Samp but I prefer the one that comes bundled with P P seven point two. People ask me all the time what version of P P they should be using and I always recommend P B 7 or higher. HP 7 is fast and allows for faster processing times which is great for development. Let me show you something really quick. Go to the WordPress dot org site and I want you to click the about link on the side. You’ll find a page called requirements. WordPress will recommend you work with BHP 7 if you read a little further than you’ll find that the absolute minimum version you need to run WordPress is p p 5.2 point for a lot of hosts will still use p p point 5.2 or P P five point three. But I’m going to recommend that you don’t develop for these versions of BHP. It may seem like you’re limiting the amount of client she’ll work with but you save yourself a huge headache by avoiding these versions. The reason being is that these versions are no longer supported by BHP. These versions have security vulnerabilities and exploitations. Personally I only developed plugins and things that are compatible with P HP 7 and up. A lot of developers such as muffin group and theme fusion don’t even support these lower versions and yet they still receive a lot of clients in the end. It’s a you all code we write will be compatible with p p version 7 and up. In case you are curious you can also check out this interesting link called statistics. This page shows information about the setup most hosts use and what versions of each software they’re using. This should give you a good idea about what the market is like. All right let’s move on. Download and install and just go through the default settings as they usually will suit you best. I won’t be going through the installation as I’ve already installed same ones installed. You can open up the control panel by searching for something called XAMPP control panel. The great thing about using SAP is that it automatically bundles and configure as most of the software you need to run a local development environment. It’s fast and easy. You’ll notice that SAP installs other programs such as file Zilla Mercury and tomcat. We won’t be using these software so you don’t need to worry about what these do and what they’re for to boot the server. You need to turn on Apache and my sequel. You should see the modules highlighted in green indicating that these modules have successfully been turned on and are currently running. If you don’t then be sure to read the long below and ask for support at the Apache friends site. We can test to see if everything is working. By clicking the admin button inside the Apache row you’ll be taken to local host. You may see a welcome message. I don’t because I deleted those files. I’ll show you where to delete those files in just a moment. Let’s set up the database first. Open the control panel once again and click the admin button in the my sequel wrote. You’ll be taken to a page called P HP my admin.

Personally I don’t like p p my admin because it is a web script almost like WordPress P HP my admin is a way to manage and view your database inside your browser just like any other script. This script will load javascript C assess and handle all requests with P. It works but it tends to be very slow at times because you have to wait for the page to load to know whether or not your request was successful. I prefer to use something called Heidi Eskew well which can be found at Heidi Eskew l dot com. You can go to the download section and just download the appropriate download for your operating system. Heidi doesn’t work well for Mac systems so here’s an alternative solution. If you’re on a Mac OS system then you should check out sequel pro. It’s fast and free. You should be able to connect to any my sequel and Maria DP databases without any problem. Once you have those installed open it up like so. Heidi yes you will is similar to HP my admin except it is written in a language called object Pascal which is a bit faster than a p p and can execute my sequel queries so much faster. This program also comes with more features which will be useful in later lectures. It’ll take some time to get used to this but I promise it’ll be worth it using Heidi. Yes. Well it’s pretty simple. First you need to create a new session. Name it whatever you want. I’ll be naming my local host a lot of the default settings are pretty good.

The host should be 1 2 7 0 0 dot 1 which is the IP of local host the user name is Root and the password will be left empty. This user is automatically created for you when you installed zip. Everything else is fine. Make sure to save and then click open. You’ll notice that I already have a few databases setup. Let’s create a new database. You simply right click in the left column and under create click database you’ll be presented with two options. The name of the database and the Coalition. The name we’ll be using is Udemy and the collation will be UTF 8 and before General S.I. the collation determines how characters are sorted and compare. For example you can have the letter A as uppercase or lowercase which gets displayed first. What about characters where there’s an accent above the letter A. As you can see there are dozens of collections with their own set of rules on how to compare characters or this course we’ll be using UTF 8 and before General S.I. because it’s been tested to be highly performance and accurate. It works with all characters including Chinese Japanese and so much more click OK and that’s it you can click on your database in the left hand column and you’ll notice that it’s empty.

We can now install WordPress in the previous lecture. You should have downloaded WordPress if you haven’t then do so now. The file you downloaded should be in the form of a zip file have not file and hands next open the XAMPP control panel from the control panel. Click on the Explorer button. This is where XAMPP is installed. All files that are served from the server to your browser is located in the HP docs folder HD docs stands for Hypertext documents. This folder is very important as we will be working inside it throughout most of this course. Feel free to delete any default files inside this folder. You don’t need them. I already have some files here as I use them daily for web development. Open your zip file and drag and drop the files from the zip file into this HP docs folder. I’m going to rename this from WordPress to you to me we can now visit this by opening up the browser and navigating to local host slash Udemy upon arriving on the page. You’ll be asked to begin installing WordPress. Let’s do this together. You’ll be asked to select your language. I’ll be using English select whatever language suits you best. Afterwards you’ll be told that the WP config dot page Free File isn’t available. WordPress will then ask you if you’d like to create this file now. I’m going to let WordPress generate this file before it can do so. It’s going to ask us for the database details let’s go through it one by one the database name is Udemy and their user name is Root. There is no password and we’ll leave the rest as it’s the last field. Is table prefix the table prefix allows you to give your database tables a unique name whatever you input here will be prefixed to all the tables WordPress generates WordPress will generate a little over 10 different tables for your site the names it generates tend to be very simple and basic. This can cause issues if you already have tables inside your database to avoid naming conflicts. You can set a prefix to give each table a unique name. For example there is a table named posts if you set the prefix to WP underscore then the new name will be WP underscore posts. You should always be mindful of the setting as will be using it ourselves in the future. For now I’m going to leave this as is if you don’t understand. That’s fine. You’ll understand what I mean. In a future lecture run the installation after some time you should see a success message. You’ll be then asked to input some basic details about your site and set up a user account input whatever details you want. You can just copy what I put if you’d like. Once you’re finished you should see a success message and you can now log in congrats. We’ve successfully installed WordPress. We’re pretty much done. There’s one last thing I wanted to do before we finish things up here. Go ahead and log into your WordPress site then go to settings perma links change the perma link settings to post name. This will make our new URLs easy to read. It’s not necessary but it will make your life simpler. We’re now finished. That was a lot to go through but hopefully you got through it.

 

Share this post on:

Leave a Reply