We have previously talked about web development with Microsoft WebMatrix. In today’s post, we are going to discuss WordPress development using WebMatrix – starting from the installation to deploying it in an online server.
A Look Into: WebMatrix for Front-End Development
There are plenty of web development applications for Windows system, such as Notepad++, Netbeans, Eclipse, Komodo, Aptana etc.... Read more
WebMatrix allows you to install WordPress directly through the application. To create a new WordPress project, Go to App Gallery.
If this is your first time accessing MySQL, you will be prompted for the password.
After accepting the WordPress UELA, WebMatrix will start downloading WordPress, and automatically create the required assets like database name and password.
In WebMatrix, click on the Site Admin. It will redirect you to the WordPress admin page. In that page, fill in the required information for the site like Site Name and your admin password. Click Install WordPress to complete the installation.
I prefer using a customized host name in my development stage, rather than sticking with the following format localhost:1245. To do so, open Notepad as Administrator.
Open the hosts file from the Windows\system32\drivers\etc\ folder in the Notepad. Then, add the following line.
This will point dev.wp.com address to the local IP address 127.0.0.1. Note that the hostname is merely an example; do change the name as required.
The next step is essential. Close, then Open WebMatrix as Adminstrator – you need administrator privilege to change the address. Then, go to the Settings panel under the Site workspace, and change the URL to the one that we have added in the hosts file, as follows.
The “port 80” is required to tell which port should be used for the address. Otherwise, the URL will only return an error.
If you are proficient in PHP and WordPress functions you can make some changes to the files, whether it is for developing themes or plugins. The only thing that you are not allowed and must not to do is changing the core files.
This is one of the more subtle features in WebMatrix; it prevents you from changing the core files and will notify you with a warning.
As we mentioned in our previous post, WebMatrix will help you with the auto-completion feature that shows a list of WordPress functions as well as its uses.
Upload WordPresss to An Online Server
Once you are done developing your WordPress website, it is time to upload it to the online server. WebMatrix provides two methods to do so; we can either do it by using Web Deploy or FTP. To use Web Deploy, contact your hosting provider first to ask if they allow this method.
Mine does not support it, so I have to use the second method: FTP.
As a reminder the FTP method does not support transfering MySQL databases, so it is likely that you should import it on your own using a MySQL Administrator for Windows like MySQL WorkBench.
I have to say that WebMatrix is one great piece of software from Microsoft. It is free, nicely built, and integrates very well with some open source project like WordPress, streamlining the development workflow. Furthermore, there are a lot more features that we will discuss in our next articles. So stay tuned.