Как установить wordpress на windows server 2012

Время на прочтение3 мин

Количество просмотров19K

Последнее время многие из наших клиентов сталкиваются с различного рода проблемами при развертывании своего сайта на виртуальном сервере с ОС Windows Server 2012 R2. В связи с этим мы приняли решение написать максимально подробное руководство, в котором пользователи смогут найти ответы на свои вопросы.

В данном руководстве мы развернём WordPress на связке IIS + PHP + MySQL, а также приведём некоторые рекомендации по настройке каждого из этих компонентов. Делать это мы будем на VPS от RUVDS с конфигурацией 2CPU, 2GB RAM, 20GB SSD. Итак, приступим…

Установка и настройка MySQL

Сначала устанавливаем распространяемые пакеты для Visual Studio 2013 (https://www.microsoft.com/ru-ru/download/details.aspx?id=40784)

Далее скачиваем установщик MySQL отсюда (mysql-installer-community-5.6.28.0.msi) и запускаем. Нам понадобится установить сервер и редактор.

Приступаем к настройке. Разработчики MySQL рекомендуют использовать тип конфигурации «Server Machine» при установке MySQL на сервере, на котором также будет запущен и веб-сервер. Данная опция в первую очередь влияет на объем потребляемой памяти. Снимаем флаг с «Open Firewall port for network access», так как веб-сервер будет также находится на данном сервере, а работать с бд мы будем с помощью локального визуального редактора бд MySQL Worbench, который мы также установили на данный сервер. На следующем окне создаём пользователя wp. Под этой учетной записью наш сайт будет работать с базой данных.

На всех следующих окнах просто жмем «Next». На данный момент предлагаемые там настройки по умолчанию нам подойдут.

В файле конфигурации C:\ProgramData\MySQL\MySQL Server 5.7\my.ini добавляем поле bind-address=localhost в разделе [mysqld] для того, чтобы mysql принимал TCP-подключения только на порт кольцевого интерфейса.
Перезапускаем службу MySQL57 в оснастке управления службами services.msc
Запускаем интерпретатор командной строки (cmd.exe) и выполняем:

C:\Users\Administrator>sc queryEx MySQL57 && netstat -nao | findstr 3306

SERVICE_NAME: MySQL57
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 1196
FLAGS :
TCP 127.0.0.1:3306 0.0.0.0:0 LISTENING 1196

Итак, сервер запущен и слушает нужный нам порт.

Создадим бд db1, используя установленный нами MySQL Workbench:

Готово!

Установка IIS+ PHP + FastCGI

Устанавливаем IIS
Сейчас нам требуется установить IIS с модулем FastCGI. Открываем панель управления сервером и кликаем «Add new roles and features»:

Теперь нам необходимо активировать службу CGI (вместе с ней активируется и модуль FastCGI)

Устанавливаем PHP5.6

Скачиваем php 5.6 (php-5.6.22-nts-Win32-VC11-x86.zip). Будем использовать Non-thread safe версию, так как FastCGI сам обеспечивает однопоточное выполнение.
Также для корректной работы php нам понадобиться пакет C++ Redistributable 2012 (https://www.microsoft.com/en-us/download/details.aspx?id=30679).
Распаковываем php в папку c:\PHP. Далее переименовываем файл php.ini-production в php.ini, открываем и устанавливаем следующие параметры:

cgi.force_redirect = 0 - рекомендуется отключить, так как не поддерживается IIS (http://php.net/manual/ru/security.cgi-bin.force-redirect.php)
open_basedir="c:\inetpub\wwwroot\wordpress"; - директория с вашим сайтом на wordpress
error_log = c:\PHP\php_errors.log - Лог файл, в котором будет отражена информация об ошибках
date.timezone = UTC
php_mysqli.dll - это расширение необходимо wordpress для работы с бд

Проверяем конфигурацию, выполнив в командной строке:

php -i

Создаём сайт в IIS

Сначала настроим обработчик для запросов к вашему сайту.

Теперь необходимо произвести некоторые настройки модуля FastCGI.

Настроим документ по умолчанию:

Теперь создадим сайт в IIS. Сначала удалим сайт по умолчанию (Default Web Site).

Наш сайт готов. Но прежде, чем пытаться получить к нему доступ по http, нам необходимо открыть 80 порт TCP.
Открываем оснастку firewall.cpl и добавляем соответствующее правило для входящих подключений:

Правило добавлено!

Далее создадим файл test.php со следующим содержимым:

<?php
phpinfo();

Поместим этот файл в корневую директорию вашего сайта (c:\inetpub\wwwroot\wordpress) и откроем в браузере ваш «сайт»: ip_вашего_сервера
Должны получить примерно следующее:

Удаляем файл test.php. Теперь можно наконец-то устанавливать WordPress.

Установка WordPress

Скачиваем WordPress (wordpress-4.5.2-ru_RU.zip).
Распаковываем архив и копируем содержимое папки wordpress в нашу корневую директорию (c:\inetpub\wwwroot\wordpress).
Теперь предоставим права на запись в директорию c:\inetpub\wwwroot\wordpress и её поддиректории группе IIS_USRS

Открываем в браузере наш сайт по адресу ip_вашего_сервера и идём по шагам установки:

Авторизуемся и попадаем в личный кабинет CMS WordPress!

Теперь откроем главную страницу по адресу ip_вашего_сервера.

Задача решена!

В этой заключительной статье цикла, описывающего развертывание веб-сайта на базе IIS с поддержкой PHP и MySQL, мы опишем типовой сценарий установки на нашем сервере «движка» сайта на примере самой популярной на данный момент системы управления контентом (CMS) блогового типа — WordPress.

Итак, предполагается, что на нашем сервере уже установлены:

  1. IIS с поддержкой PHP (Установка IIS с PHP на Windows)
  2. Система управления БД MySQL (Установка MySQL на Windows)
  3. Опционально, для удобства работы с базами данных MySQL можно установить скрипт phpMyAdmin.

Автоматическая установка WordPress

Проще всего развернуть сайт с WordPress с помощью, уже знакомого нам по предыдущим статьям цикла, универсального установщика Microsoft Web Platform Installer (Web PI). Запускаем его и в поле поиска вбиваем wordpress.

Находим в списке продуктов WorpPress, нажимаем Add, а затем Install.

Установка WordPress на IIS в windows

В процессе развертывания сайта WordPress, Web PI автоматически создаст новую базу данных MySQL и пользователя (имя БД, пользователя и его пароль будут отображены на экране установки, в случае необходимости их можно сохранить).

web platform installer параметры БД для wordpress

Также будет создан отдельный сайт IIS, живущий на определенном порту (номер порта генерируется установщиком). В нашем примере был создан сайт на порту 30205 с адресом http://localhost:30205 .

После завершения установки в браузере автоматически откроется новое окно, в котором необходимо заполнить следующие поля: заголовок сайта, имя администратора сайта, пароль и e-mail администратора сайта WordPress.

wordpress экран первоначальной настройки

Для завершения установки осталось нажать кнопку Install Wordpress. Дождитесь выполнения скрипта, после чего можно перейти в панель управления WordPress по адресу http://localhost:30205/wp-login.php

wordpress окно авторизации

Итак, перед нами открылась административная панель WordPress (админка) и можно приступать непосредственно к настройке и наполнению сайта.

wordpress панель управления (админка)

Существенный недостаток установки WordPress с помощью WebPI – большое количество «лишних» компонентов, которые устанавливаются вместе с ним.

На скриншоте выделены компоненты, которые были установлены вместе с CMS WordPress. Как видите, их не мало.

И самое главное, вместо нашего «родного» сервера IIS для установленного сайта будет использоваться отдельный инстанс IIS Express 8.0.

wordpress на iis8 express и другие компоненты

Ручная установка WordPress на IIS

Прежде, чем приступить к ручной установке WordPress на Windows 8, нужно выполнить ряд подготовительных операций.

В первую очередь необходимо создать базу данных для хранения данных WordPress и пользователя с правами доступа к этой базе данных. Создать базу и пользователя можно через phpMyAdmin, либо непосредственно из командной строки MySQL.

Открываем командную оболочку MySQL (MySQL Command Line Shell), указываем пароль администратора сервера MySQL (root) и последовательно выполняем такие команды:
mysql> CREATE DATABASE wordpressdb;
mysql> CREATE USER 'wordpressdb_user'@'localhost' IDENTIFIED BY 'DbP@ssw0rd';
mysql> GRANT ALL ON wordpressdb.* TO 'wordpressdb_user'@'localhost' IDENTIFIED BY 'DbP@ssw0rd';


Итак, мы создали БД wordpressdb и дали на нее полные права пользователю wordpressdb_user.

Следующий этап — создание отдельного сайта на IIS. Создадим новый каталог (например, с именем MyWordPress) в папке C:\inetpub\wwwroot\ .

Качаем архив с последней версией WordPress с этой страницы https://wordpress.org/download/ (на момент написания статьи это WordPress 4.0) и распаковываем его содержимое в каталог C:\inetpub\wwwroot\MyWordPress.

каталог с распакованным wordpress

Примечание. Не обязательно устанавливать WordPress на отдельный сайт, можно установить его в отдельный подкаталог уже существующего сайта.

Откроем консоль управления IIS (Internet Informations Services Manager — C:\WINDOWS\system32\inetsrv\iis.msc) и щелкнув по разделу Sites, выберем Add Website.

В окне указываем имя сайта, путь к каталогу сайта и порт (мы запустим сайт на порту 8080).

iis параметры нового сайта

Затем в консоли перейдем на созданный сайт (MySitePress) и дважды щелкнем по пункту Authentication.

IIS секция Authentication

В разделе аутентификации выберем пункт Anonymous Authentication и в панели Actions нажмите Edit..

Anonymous Authentication в IIS

В открывшемся окне изменить настройку на Application Pool Identity.

Application Pool Identity

Далее предоставим нашему пулу приложения права записи на каталог, в котором находится сайт WordPress. Сделать это можно с помощью утилиты icacls:
icacls "C:\inetpub\wwwroot\MyWordPress" /grant "IIS APPPOOL\MySitePress":(OI)(CI)(RX,W)

icacls права на каталог wordpress

Итак, мы настроили IIS, и можно переходить непосредственно к установке «движка» WordPress.

Откроем наш сайт в браузере (http://localhost:8080) В открывшемся окне заполним параметры подключения к БД:

Database name : wordpressdb

Database username : wordpressdb_user

Database password : DbP@ssw0rd

Database host : localhost

Table prefix : mywp_ (префикс в общем-то произвольный и нужен, если в дальнейшем в этой же базе будут находится таблицы других сайтов WordPress )

Wordpress параметры подключения к БД MySQL

После этого должно открыться окно, аналогичное представленному на 3 скриншоте. Далее все по аналогии.

Советы

  • Для ускорения выполнения скриптов PHP в IIS рекомендуется установить специальный модуль-акселератор – Windows Cache Extension (или аналог)
  • Для формирования SEO-friendly URL адресов нужно установить модуль IIS URL Rewrite

This tutorial will cover setting up WordPress on Windows Server 2012 R2 with IIS, PHP and MySQL. Topic is only installation procedure (since it can be tricky on Windows Server 2012R2) not the security or WordPress configuration.

You can use xampp or lamp bundles, but I find this better and more secure.

First, let’s install IIS.

IIS

Server Manager |Manage | Add Roles and Features | Next |Next |Under Server Roles choose Web Server (IIS) |choose all options from the screenshots | Next | Install |After setup is done – Close

wordpress_install_1

Next installation

Visual C++ Redistributable for Visual Studio 2015 – we need both x32 and x64 versions installed

https://www.microsoft.com/en-us/download/details.aspx?id=48145

Installation is simple (Next – Next) and I won`t be covering it.

wordpress_install_5

PHP Manager for IIS – installation is also pretty simple and I won`t be covering it. You only need x64bit version of installation

https://phpmanager.codeplex.com/

wordpress_install_6

PHP

PHP 7.0 is current version. We need VC14 x64 Non Thread Safe in ZIP  version

http://windows.php.net/download/

wordpress_install_7

After downloading ZIP, extract it to your disk (root or sub directory it is up to you) I`ll be extracting mine to C:\PHP

wordpress_install_8

MySQL

Choose MYSQL Community Server | MySQL Installer MSI

http://dev.mysql.com/downloads/

wordpress_install_9

Before download starts, you`ll be asked to Login or Sign UP. Don`t bother, there is smaller text bellow that says “No thanks, just start my download.”

wordpress_install_10

I won`t be going through whole install procedure, I will just mention important things.

For this tutorial I choose Server only install |Next

wordpress_install_11

Execute

g1

Next

wordpress_install_13

Next

wordpress_install_14

Config Type – Server Machine | Connectivity – TCP/IP – Port Number 3306 |Next

wordpress_install_15

You need to define root account password. Under MySQL User Accounts field define other accounts for your DB so that you don`t have to use root account for your DBs.

Ignore my password strength – it is easier and faster in the lab environment with simple password, but for your production environment you should always use strong passwords.

wordpress_install_16

I recommend that you Configure MySQL Server as a Windows Service. You can also define custom user account for that service (recommended).

wordpress_install_17

Next

wordpress_install_18

Execute

wordpress_install_19

Success | Finish

wordpress_install_20

For easier management of MySQL I installed phpMyAdmin

https://www.phpmyadmin.net/

wordpress_install_21

I don`t want my phpMyAdmin to be accessible from the internet so I done following:

In the root of my C disk I created new folder called InternalWeb. In InternalWeb folder I created subfolder phpMyAdmin

I copied all from downloaded phpMyAdmin.zip into created folder.

wordpress_install_22

I gave Modify permissions to user IUSR to folder InternalWeb and subfolder myPhpAdmin

Open IIS Manager |expand Server |right click on Sites |Add Website

wordpress_install_24

I added Site name, path to site and changed port to 82. That port is closed on firewall and phpMyAdmin will only be accessible for management on server. You can also choose IP address instead of All Unassigned  |OK

wordpress_install_25

New website is created | Click on it and choose PHP manager from the middle

wordpress_install_26

PHP is not enabled. We have to enable it.

Choose Register new PHP version

wordpress_install_27

Choose php-cgi.exe from the folder you extracted PHP installation in the beginning

wordpress_install_28

We registered PHP

wordpress_install_29

After this step, head on to your web browser and depending on where and how you put your phpmyadmin enter address in URL

Mine is http://localhost:82/phpmyadmin

Enter username and password you created during MySQL installation |GO

wordpress_install_30

If you done everything exactly as described in this tutorial so far you`ll be able to login

wordpress_install_31

Now, while we are still here let`s create database for our WordPress installation

New

wordpress_install_32

I entered “wordpress” for DB name and left all other settings as default (you can of course adapt settings to your needs) |Create

wordpress_install_33

Database wordpress is created

WordPress

Download latest ZIP from here

Download

wordpress_install_35

Generally, I don`t user inetpub folder (supplied by IIS) for my websites. It is old habit I have since Server 2003 when it was vulnerability and all the attacks were usually pointed to that folder.

I will create folder in the root of C:\ named wordpress and extract wordpress install files into it. User IUSR should have permissions on it (see phpMyAdmin directory example above).

This time before creating new website in IIS I`ll do something else first.

Open IIS Manager |expand Server |right click on Application Pools |Add Application Pool

wordpress_install_36

I just entered name and left all the other options as default | OK

Application Pool “wordpress” should be created and Started

Before creating new website go to Sites |Default Web Site |right click | Remove |Yes . I don`t usually want default website to be active. Be sure to check if you have any webs or apps in it already before deleting it.

wordpress_install_38_1

Now, follow procedure for creating new website that I already covered in this tutorial (phpmyadmin). Be sure to select “wordpress” Application Pool (or however you called it) – you can also choose IP address instead of All Unassigned |OK

wordpress_install_39

Check once again PHP Manager and enable it for new website in case you already haven`t (see IIS settings for myphpadmin above).

wordpress_install_40

And now final step – in your web browser enter localhost  – you should be greeted with setup procedure | choose language | Continue

wordpress_install_41

Let`s go

wordpress_install_42

Enter DB name (you already created database in phpmyadmin) username and password for DB (created in MySQL setup) |Submit

wordpress_install_43

Run the install

wordpress_install_44

Enter parameters for your new website – username and password are for wordpress administration. Use only strong passwords (long with special characters included) because this part is accessible from the internet. |Install WordPress

wordpress_install_45

Success |Log in

wordpress_install_46

You are now taken to the administration part of your WordPress installation (login with user and pass just defined)

wordpress_install_47

wordpress_install_48

And If you enter just localhost you`ll be greeted with your new shiny website

wordpress_install_49

Delete install.php from your wordpress/wp-admin folder after install finishes.

Conclusion:

There you go, WordPress is installed and working on your Windows Server 2012 R2. Security and configuration is another topic and I haven`t touched it here in details. Be sure to always stay up to date with all your installs, have AV installed, firewall in place and remember – always use strong passwords. There is no absolute security, but this with these little security measures you`ll be better protected.

Disclaimer

In this guide I will show some simple steps of how to create a WordPress blog on Windows, I am going to do this manual in this guide as I feel that way you learn how all applications have been set up.
If you want to do it the quick way you can simply use: https://webgallery.microsoft.com/apps/WordPress

I used for this setup the following servers that have Windows Server 2012 R2 installed.

wordpress01: 192.168.1.46 / 4GB ram / 2 cpu
mariadb01: 192.168.1.47 / 4GB ram / 2 cpu
mariadb02: 192.168.1.48 / 4GB ram / 2 cpu

Workgroup: ULYAOTH

You can of course just install everything on one server and simply remove the whole MariaDB replication part, and just install do a single database installation of MariaDB on the same server as WordPress.

Now let us get to work!

Step 1: Download MariaDB (Only on the servers mariadb01 and mariadb02)
You can download MariaDB from: https://www.mariadb.org

Step 2: Install MariaDB (Only on the servers mariadb01 and mariadb02)
Start the installation by double-clicking the “mariadb-10.0.12-winx64.msi” file.

You should see a screen like this now:

Just press on next.

On this window click the box before the text “I accept the terms in the License Agreement” of course read the terms first! and then click “Next”.

Everything is fine on this window so press “Next” again.

On this window fill in a “root” password for the mysql admin account and I normally click also “Use UTF8 ad default server’s character set” however if you use plain English you can ignore this one.
And again press “Next”

On this page just leave everything default and press “Next”. (I change the Buffer pool Size to 512mb but this is not required)

Since my two Database servers will not have an internet connection I just click “Next” on this window.

Press on “Install” to start the installation of MariaDB.

Congratulations you now have installed MariaDB so just click on “Finish” to close the installation.

Step 3: Change the MariaDB config files (Only on the servers mariadb01 and mariadb02)
Open “C:\Program Files\MariaDB 10.0\data\my.ini” (Only on the servers mariadb01 and mariadb02)

On mariadb01 under the “[mysqld]” part add the following:
server-id=1
log-bin=mysql-bin
binlog_format=mixed

On mariadb02 under the “[mysqld]” part add the following:
server-id=2
log-bin=mysql-bin
binlog_format=mixed

Step 5: Restart the database servers (Only on the servers mariadb01 and mariadb02)
Just reboot the windows servers to test that mariadb will correctly start automatically and take into affect the new configuration.

Step 6: Open the Graphical MariaDB user-interface (Only on the servers mariadb01 and mariadb02)
Start HeidiSQL this was installed with MariaDB.

You should see a window like this when it is started:

click on “New” at this window

Name your session “MariaDB01” or “MariaDB02” Depending on the server you are, and full in your root password and then press “Save” and then on “Open”.

You should see this now.

Step 7: Create a replication user (mariadb01 only)
Inside the graphical interface click on the “Query” tab next to “Host: 127.0.0.1”.

On the “Query” tab add the following:
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%' IDENTIFIED BY 'replication007';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'192.168.1.48' IDENTIFIED BY 'replication007';
FLUSH PRIVILEGES;
SHOW MASTER STATUS;

And then press on the run button, so it should look as below:

Mark down the result you will see for me this is
File: mysql-bin.000003
Position: 826

Step 8: Configure the slave inside the graphical mariadb interface (mariadb02 only)
Inside the graphical interface click on the “Query” tab next to “Host: 127.0.0.1”.

On the “Query” tab add the following:
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST='192.168.1.47', MASTER_USER='repl', MASTER_PASSWORD='replication007', MASTER_PORT=3306, MASTER_LOG_FILE='mysql-bin.000003', MASTER_LOG_POS=826;
START SLAVE;
SHOW SLAVE STATUS;

It should look something like:

You can have a look in the results window it should say something like:
Slave_IO_Running: Yes
Slave_SQL_Running: Yes

If you do not see this then make sure you change the ip at “MASTER_HOST=’192.168.1.47′” to your “mariadb01” server.

Step 9: Create the WordPress database (mariadb01 only)
Inside the graphical interface click on the “Query” tab next to “Host: 127.0.0.1”.

On the “Query” tab add the following:
CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO "ulyaothblog"@"%" IDENTIFIED BY "ulyaoth007";
GRANT ALL PRIVILEGES ON wordpress.* TO "ulyaothblog"@"localhost" IDENTIFIED BY "ulyaoth007";
GRANT ALL PRIVILEGES ON wordpress.* TO "ulyaothblog"@"192.168.1.47" IDENTIFIED BY "ulyaoth007";
FLUSH PRIVILEGES;
SHOW DATABASES;

It should look as following:

Step 10: Test if replication works (mariadb02 only)
Inside the graphical interface click on the “Query” tab next to “Host: 127.0.0.1”.

On the “Query” tab add the following:
SHOW DATABASES;

It should show now the wordpress database on your slave also as below:

Congratulations this was all when it comes to the database part! just remember the information:
Database name: ulyaothblog
Password: ulyaoth007

Of course I assume you changed this accordingly to something else :)!

Now all that is left is to actually create the WordPress server itself so let’s continue.

Step 11: Install IIS
Go to “Server Manager” and choose “Add Roles and Features Wizard” from the list here choose “Web Server (IIS)” also select to install the CGI module! now go further and let it install.

Step 12: Download WordPress
Go to “https://wordpress.org/download/” and download WordPress.
Direct URL: https://wordpress.org/latest.zip

Step 13: Extract wordpress
Extract WordPress to “C:\ulyaoth\wordpress\”

Step 14: Download php
Go to “https://windows.php.net/” and download php from there.
Direct link: https://windows.php.net/downloads/releases/

Please be aware php 64bit that I am using is still experimental, if you will use this in production please go for the 32bit version.

Step 15: Extract php
Extract PHP to “C:\PHP\”

Step 16: Add php to your system path
Right click on “This PC” and choose “Properties” on the right bottom site next to your computer and full computer name click on Change settings.
On the window that opens go to the Advanced tab and click on “Environment Variables”.
At the bottom box called “System Variables” search for “Path” in the list and click on “Edit”
Now a new window should open and at the “Variable Value” at the very end add this to the line “;C:\PHP”

So it should look like this:

If it looks like that just press “OK” three times to save everything.

Step 17: Rename php.ini config
Go to “C:\PHP\” and rename the file “php.ini-production” to “php.ini”.

Step 18: Open IIS Manager and stop the “Default Web Site”

Just press the stop button like you see below in the picture:

Step 19: Create a new website for your blog as shown below
Right click on “sites” in the left part of IIS Manager and click “Add Website”.

Fill it in something like this:

Step 20: Make it so IIS can execute php scripts

While still inside the IIS Manager click on your website then double-click Handler Mappings.
The window should change simply right click and choose “Add Module Mapping”.

Now fill it in as follows:
Request path: *.php
Module: FastCgiModule
Executable: C:\PHP\php-cgi.exe
Name: PHP

If it looks as the picture below press on “OK”.

if you do not see “FastCgiModule” then it means you did step 11 wrong and not installed the cgi module also.

Step 21: Add “index.php” ad a Default Document
While still inside the IIS Manager click on your website and then double-click Default Document.
The window should change simply right click and choose “Add”.

Now fill it in as follows:
Name: index.php

It should look like this:

Step 22: Download Visual C++ Redistributable for Visual Studio 2012
Download installer at the following location: https://www.microsoft.com/en-us/download/details.aspx?id=30679#

Step 23: Install Visual C++ Redistributable for Visual Studio 2012
Double click “vcredist_x64.exe” and install it.

Click on “I agree to the license terms and conditions” and then install.

Press on “Close” to finalize the installation.

Step 24: Edit php.ini
Open “C:\PHP\php.ini” and change the following lines:

Change:
;date.timezone =

To:
date.timezone = Europe/Stockholm

You might want to find your own time zone at https://secure.php.net/manual/en/timezones.php

Also, Change:
;extension=php_mysql.dll

To:
extension=C:\PHP\ext\php_mysql.dll

Step 25: Install WordPress.
Go to your websites domain name for me “https://blog.ulyaoth.net” and follow the steps below.

Press on “Create a Configuration File” to continue the installation.

Press on “Let’s go!” to continue the installation.

Fill in all the information as I did of-course use your information from the previous steps and then press on “Submit”.

On this tab you have to copy all information and copy it inside a notepad and then save the file as wp-config.php in “C:\ulyaoth\wordpress\”
So you should end up with a file like this: C:\ulyaoth\wordpress\wp-config.php

Once done you can press on “Run the install”.

Fill this in accordingly so it has what you wish and then press on “Install WordPress”

Congratulations you have no successfully installed WordPress you can press “Log in” to go to the WordPress control panel.

This was it if you now go to your website so for me “http://blog.ulyaoth.net” you will see WordPress up and running.

As always if you see any mistakes or improvements please let me know! Again you can install WordPress easier as I wrote in the top of the website but by doing it manually you learn some IIS, some php and you have a Master/Slave setup for your database.

I hope it helps someone! 🙂

Languages:
English
IIS サーバーへのインストール 日本語
(Add your language)

Contents

  • 1 Install Internet Information Services 8.5 and WordPress 3.x by Using the Microsoft Web Platform Installer 5.0
  • 2 Prerequisites
  • 3 Step 1. Install Microsoft Web Platform Installer 5.0
  • 4 Step 2. Select the products and applications to install
  • 5 Step 3. Review and configure the selected products and applications
  • 6 Step 4. Complete the installation and configuration
  • 7 Step 5. Enable clean URLs (Pretty Permalinks)
  • 8 Step 6. Running Microsoft WebMatrix with WordPress
  • 9 Additional Information

Install Internet Information Services 8.5 and WordPress 3.x by Using the Microsoft Web Platform Installer 5.0

NOTE: As of 12.02.2020. Microsoft WPI (5.1) does not install PHP support correctly on Windows 10, thus the WordPress installation fails.

This article describes how to install and configure WordPress 3.x on Windows clients and servers (see Prerequisites) using the Microsoft Web Platform Installer (Web PI) version 5.0. As of May 28, 2014, the latest version of WordPress is 3.9.1.

The Web PI is a free tool that makes getting the latest components of the Microsoft Web Platform—including Internet Information Services (IIS), MySQL, PHP, the Microsoft .NET Framework, and Visual Web Developer—quick and easy. The Web PI also lets you install web applications such as WordPress with the built-in Windows Web App Gallery.

To install WordPress on IIS 8.5 by using the Web PI 5.0, follow these steps:

Prerequisites

Step 1. Install Microsoft Web Platform Installer 5.0

Step 2. Select the products and applications to install

Step 3. Review and configure the selected products and applications

Step 4. Complete the installation and configuration

Step 5. Enable clean URLs (Pretty Permalinks)

Step 6. Running Microsoft WebMatrix with WordPress

Prerequisites

The supported operating systems for the Microsoft Web Platform Installer (Web PI) 5.0 are Windows 8.1, Windows 8, Windows 7, Windows Vista Service Pack 1 (SP1), Windows Vista, Windows XP Service Pack 2 (SP2), and later versions, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008, and Windows Server 2003 Service Pack 1 (SP1) and later versions.

For this guide, it is assumed that you have either Windows Server 2012 R2 or Windows 8.1 Pro client installed on your computer. You will also need an Internet connection and administrator privileges for your computer.

It is a good idea to confirm that your system meets the hardware requirements for IIS 8.5. See http://technet.microsoft.com/en-us/library/dn303418.aspx for more information.

Step 1. Install Microsoft Web Platform Installer 5.0

In this step, you download, install, and launch the MS Web Platform Installer (Web PI 5.0, which is a 1.4 MB download).

  1. Log into your Windows machine as a user with administrative privileges.
  2. Launch Internet Explorer (other browsers work too).
  3. Go to http://www.microsoft.com/web/downloads/platform.aspx, and then click the Free Download button.
    Microsoft Web Platform Installer 5.0 webpage

  4. Click Run.
  5. Click Run again.
  6. Wait a few seconds for the Web PI 5.0 to start.

Step 2. Select the products and applications to install

In this step, you select the version of WordPress that you want to install. WordPress 3.9.1 is used in this guide.

  1. On the «Web Platform Installer» start screen click the Applications tab, and then click the Add button associated to the right with «WordPress».
    List of apps on WebPI

  2. Click Install.
    Select WordPress on WebPI

Step 3. Review and configure the selected products and applications

In this step, you review and configure what you have added. Additionally, you add the database and configure the password for it.

  1. When you are asked which type of database you want to use, leave MySQL (Not installed) selected.
    Note: This will install MySQL 5.1 for Windows to handle all the database transactions that are required by WordPress.
  2. In password fields, type in a password for your database, and then click Continue.
    Database engine configuration

  3. Review the files to be downloaded and installed, as well as the license agreements, and then click I Accept.
    Application installation summary

  4. Allow the Web PI installation to complete.
    WordPress Installation process

  5. Configure Security Keys.
    The WordPress Security Keys section describes what these keys are and how they’re used.
    Configure Security Keys

    The keys don’t need to be remembered, they should just be long, random, and complicated. An easy way to generate the keys is to use the online key generator. Each time you click browser refresh, the online key generator creates a new set of keys.

    Note: The online key generator produces keys that may contain dollar signs (‘$’) which cannot be used with keys entered into Web-PI. Until this Web-PI issue is resolved, a simple solution is to check for dollar sign characters and simply replace ‘$’ with ‘S’ (any alpha character will work).

    Here’s an example set of keys — don’t use these, use the online key generator to create your own unique keys!

    Example Security Keys

  6. Finish.
    On the FINISH dialog click the copy to clipboard link (this copies your database settings and password to the clipboard), paste and save this information in a file for future reference, and then click the Finish button.
    Installation completed

  7. Microsoft WebMatrix will open, allowing you to configure additional settings related to your WordPress site:
    WebMatrix summary screen

Step 4. Complete the installation and configuration

In this step, you complete the installation.

  1. Switch to Internet Explorer.
  2. Go to your WordPress website. For example, go to http://localhost/myWordPress.
  3. In the Site Title box, type the name of your site.
  4. In the Password, twice boxes, type a password for the admin account.
    WordPress site configuration

  5. In the Your E-mail box, type the email address for the admin account.
  6. Click Install WordPress.
    WordPress site configuration (continued)

  7. Click Log In.
    WordPress site configuration completed

  8. Type admin, type the password, and then click Log In.

Step 5. Enable clean URLs (Pretty Permalinks)

In this step, you enable Pretty Permalinks now that WordPress has been installed.

  1. In the Dashboard menu, click Settings.
  2. Scroll down, and then click Permalinks.
  3. Under Common settings, select a common Permalink setting or select Custom Structure to create your own Permalink, and then click Save Changes.
    Permalink settings

The installation is now complete, and you are ready to use WordPress!

Step 6. Running Microsoft WebMatrix with WordPress

The Microsoft Web Platform Installer (Web PI) installs WordPress to run in a localhost configuration in combination with Microsoft WebMatrix (which was also installed as part of the Web PI installation). When WebMatrix is not running (e.g., after a reboot or if you terminate WebMatrix) you will not be able to access your localhost WordPress site until WebMatrix is restarted. Use the following steps to start WebMatrix and launch your localhost WordPress site.

  1. Click Start, click All Programs, click-open the Microsoft WebMatrix folder, and then click to launch the Microsoft WebMatrix app.

     

  2. On the WebMatrix start page, click the My Sites button to display the installed sites, and then click your wordpress site that displays in the pop-up context menu.
    Open your WordPress site

     

  3. After the site opens, click the lower-left Site tab to display links for the WordPress launch URL and file Path.

     

  4. Click on the site URL link to launch your localhost WordPress site.

     

  5. At this point WebMatrix will open a browser window to your localhost WordPress site which you can customize and add content to.

Remember: WebMatrix must be left running while you interact with your localhost WordPress site.

Additional Information

  • WordPress is free, open-source content management system (CMS) software that lets individuals or communities of users easily publish, manage, and organize a wide variety of content on a website. For more information about WordPress, visit these websites:
    • http://www.wordpress.org/
    • http://codex.wordpress.org/Main_Page
  • IIS URL Rewrite 2.0 lets you create powerful rules to implement URLs that are easier for users to remember and easier for search engines to find. For more information, visit these websites:
    • http://www.iis.net/download/urlrewrite
    • http://learn.iis.net/page.aspx/734/url-rewrite-module/
  • Windows Cache Extension for PHP is a PHP accelerator that is used to increase the speed of PHP applications that are running on Windows and on Windows Server. After Windows Cache Extension for PHP is enabled and loaded by the PHP engine, PHP applications can take advantage of the functionality without any code modifications. For more information, visit this website:
    • http://www.iis.net/download/wincacheforphp
  • PHP Manager for IIS is a tool for managing one or many PHP installations on IIS 7.0 servers. For more information, visit these websites:
    • http://www.iis.net/community/default.aspx?tabid=34&g=6&i=2007
    • http://learn.iis.net/page.aspx/944/using-php-manager-for-iis-to-setup-and-configure-php/
  • For more general information about PHP, visit these websites:
    • http://www.php.net/manual/en/install.windows.manual.php
    • http://www.php.net/manual/en/install.windows.iis6.php
    • http://www.php.net/manual/en/install.windows.iis7.php
  • Other useful links:
    • http://php.iis.net/
    • http://windows.php.net/
    • http://forums.iis.net/1102.aspx
  • For information on media upload permission errors, or 500 errors when loading uploaded images, visit these sites:
    • https://www.bluevalleytech.com/techtalk/blog/iis-500-errors-when-loading-a-static-image-in-wordpress.aspx
    • http://www.amixa.com/blog/2011/04/29/iis-wordpress-images-500-error/

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Ноутбук сам входит в спящий режим windows 10
  • Placeholdertilelogofolder что это за папка windows 10
  • Windows hello active directory
  • Windows server настройка dhcp failover
  • Lenovo power management driver for windows