Home php教程 php手册 Windows7部署WordPress傻瓜式教程(IIS7.5+MySQL+PHP+WordPress)

Windows7部署WordPress傻瓜式教程(IIS7.5+MySQL+PHP+WordPress)

Jun 06, 2016 am 09:51 AM
mysql php windows7 wordpress code Open source Tutorial programming programming language software development deploy

打算在本地装个 WordPress 玩玩,可以前没有接触过 PHP 和 MySQL 。

在网上淘啊淘,教程一大堆,但却没有一个能让人完全信赖的,走了不少弯路,不过最后终于弄出来了。

为了让大家少走弯路,觉得有必要把这个过程记录下来。

 

第一次写教程,面向零部署经验的朋友,洋洋撒撒这么多,有点罗嗦了,请海涵,内容如有不正确的,请拍砖。

 

由于图片比较多,网页打开可能需要一些时间,请耐心等待。

我把该教程做成了一个PDF,网速慢的朋友可以在这里下载 http://files.cnblogs.com/vengen/WordPressInstall.zip

 

目录:

1、Windows7安装IIS7.5;

2、安装MySQL及配置;

3、安装PHP;

4、部署WordPress;

5、WordPress站点备份及迁移(2009-1-2修改)。

相关程序:

mysql-essential-5.0.67-win32.msi (part1)

mysql-essential-5.0.67-win32.msi (part2)

php-5.2.12-Win32.zip

wordpress-2.9-zh_CN.zip

 

1、Windows7安装IIS7.5

a、打开“控制面版”;

image

b、找到“程序和功能”,打开;

image

c、打开“打开或关闭Windows功能”,为了避免麻烦,建议全部勾选“Internet 信息服务”和“Internet Information Services 可承载的Web核心”;

image

 

d、“确定”保存,IIS安装完成。

 

2、安装MySQL及配置

我用的MySQL是(mysql-essential-5.0.67-win32.msi)

注意:接下来我全部会安装在 D:\Server_Core 路径下,文中会有很多地方使用到该路径。大家可以根据自己的需要设定,但是配置时要注意替换。

 

a、安装MySQL,设置如同图所示:

image_thumb2

image_thumb31[4]

image_thumb1[1]

image_thumb2[1][1]

image_thumb81

image_thumb5

image_thumb6[1]

image_thumb7[1]

b、配置MySQL

image_thumb9

image_thumb10

image_thumb11

image_thumb12

image_thumb13

image_thumb14

image_thumb15

image_thumb16

image_thumb17

image_thumb18

image_thumb19

进行测试:

image_thumb22

MySQL配置完成。

 

3、安装PHP

我用的PHP是(php-5.2.12-Win32.zip)

a、直接解压到 D:\Server_Core\PHP 路径下

image

b、用文本编辑器打开 php.ini-recommended,将文件名改为 php.ini 并做如下修改:

image

image

image

image

c、打开IIS7.5;

image_thumb11[4]

d、打开“处理程序映射”;

image

e、打开“添加模块映射”,进行如下设置;

image

f、“确定”完成PHP安装及IIS7.5配置,重启 IIS 。

g、测试 IIS7.5 + MySQL + PHP 是否安装成功

新建 info.php ,内容为 ,如图:

image

将这个文件放在 IIS 默认站点下,看是否能正常显示:

image

如果得到以上显示,说明你部署成功了,恭喜!(不过一般情况下按照前面的步骤一步步走下去应该是不会失败的)

 

4、部署WordPress

a、解压 wordpress-2.9-zh_CN.zip 至 D:\Server_Core\wordpress ;

image

b、创建WordPress数据库

打开 cmd 控制台,输入:mysql -u root -p     输入密码

查看现有的数据库,输入:show databases;

创建WordPress数据库wordpress_db,输入: create database wordpress_db;

创建完成,操作过程如下图:

image

c、用文本编辑器打开 wp-config-sample.php,将文件名改为 wp-config.php 并做如下修改:

image 

image

image

其中最后一处修改可以访问 https://api.wordpress.org/secret-key/1.1/ 获取

d、添加 WordPress 站点

打开 ISS7.5,“添加网站”;

image

image

e、配置站点:

打开 http://localhost/wp-admin/install.php 输入博客标题和您的电子邮件

image

安装 WordPress

image

就到此位置,剩下的自己去探索吧!

 

5、WordPress 站点备份及迁移

最后再讲一下WordPress站点如何备份和迁移吧,

1、IIS站点备份很容易,只要直接备份 D:\Server_Core\wordpress 文件夹即可。

2、备份和还原 wordpress_db 数据库也是同样道理,也是直接操作 D:\Server_Core\MySQL\data\wordpress_db 文件夹,只是在操作前要停止 MySQL 服务。

进入控制面板,打开“服务”

image[3]

找到 MySQL

image[15] 

停止此服务

image[18]

打开 MySQL 数据库存放目录 D:\Server_Core\MySQL\data

image[21]

对文件夹 wordpress_db 直接进行备份还原操作即可。

 

一切就这么简单!

 

 

 

Vengen

2009-1-1 发表

2009-1-2 修改

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

How to fix mysql_native_password not loaded errors on MySQL 8.4 How to fix mysql_native_password not loaded errors on MySQL 8.4 Dec 09, 2024 am 11:42 AM

One of the major changes introduced in MySQL 8.4 (the latest LTS release as of 2024) is that the "MySQL Native Password" plugin is no longer enabled by default. Further, MySQL 9.0 removes this plugin completely. This change affects PHP and other app

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

PHP Program to Count Vowels in a String PHP Program to Count Vowels in a String Feb 07, 2025 pm 12:12 PM

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

Problem-Solving with Python: Unlock Powerful Solutions as a Beginner Coder Problem-Solving with Python: Unlock Powerful Solutions as a Beginner Coder Oct 11, 2024 pm 08:58 PM

Pythonempowersbeginnersinproblem-solving.Itsuser-friendlysyntax,extensivelibrary,andfeaturessuchasvariables,conditionalstatements,andloopsenableefficientcodedevelopment.Frommanagingdatatocontrollingprogramflowandperformingrepetitivetasks,Pythonprovid

Demystifying C: A Clear and Simple Path for New Programmers Demystifying C: A Clear and Simple Path for New Programmers Oct 11, 2024 pm 10:47 PM

C is an ideal choice for beginners to learn system programming. It contains the following components: header files, functions and main functions. A simple C program that can print "HelloWorld" needs a header file containing the standard input/output function declaration and uses the printf function in the main function to print. C programs can be compiled and run by using the GCC compiler. After you master the basics, you can move on to topics such as data types, functions, arrays, and file handling to become a proficient C programmer.

Create the Future: Java Programming for Absolute Beginners Create the Future: Java Programming for Absolute Beginners Oct 13, 2024 pm 01:32 PM

Java is a popular programming language that can be learned by both beginners and experienced developers. This tutorial starts with basic concepts and progresses through advanced topics. After installing the Java Development Kit, you can practice programming by creating a simple "Hello, World!" program. After you understand the code, use the command prompt to compile and run the program, and "Hello, World!" will be output on the console. Learning Java starts your programming journey, and as your mastery deepens, you can create more complex applications.

See all articles