Windows7部署WordPress傻瓜式教程(IIS7.5+MySQL+PHP+WordPress)
打算在本地装个 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、打开“控制面版”;
b、找到“程序和功能”,打开;
c、打开“打开或关闭Windows功能”,为了避免麻烦,建议全部勾选“Internet 信息服务”和“Internet Information Services 可承载的Web核心”;
d、“确定”保存,IIS安装完成。
2、安装MySQL及配置
我用的MySQL是(mysql-essential-5.0.67-win32.msi)
注意:接下来我全部会安装在 D:\Server_Core 路径下,文中会有很多地方使用到该路径。大家可以根据自己的需要设定,但是配置时要注意替换。
a、安装MySQL,设置如同图所示:
b、配置MySQL
进行测试:
MySQL配置完成。
3、安装PHP
我用的PHP是(php-5.2.12-Win32.zip)
a、直接解压到 D:\Server_Core\PHP 路径下
b、用文本编辑器打开 php.ini-recommended,将文件名改为 php.ini 并做如下修改:
c、打开IIS7.5;
d、打开“处理程序映射”;
e、打开“添加模块映射”,进行如下设置;
f、“确定”完成PHP安装及IIS7.5配置,重启 IIS 。
g、测试 IIS7.5 + MySQL + PHP 是否安装成功
新建 info.php ,内容为 ,如图:
将这个文件放在 IIS 默认站点下,看是否能正常显示:
如果得到以上显示,说明你部署成功了,恭喜!(不过一般情况下按照前面的步骤一步步走下去应该是不会失败的)
4、部署WordPress
a、解压 wordpress-2.9-zh_CN.zip 至 D:\Server_Core\wordpress ;
b、创建WordPress数据库
打开 cmd 控制台,输入:mysql -u root -p 输入密码
查看现有的数据库,输入:show databases;
创建WordPress数据库wordpress_db,输入: create database wordpress_db;
创建完成,操作过程如下图:
c、用文本编辑器打开 wp-config-sample.php,将文件名改为 wp-config.php 并做如下修改:
其中最后一处修改可以访问 https://api.wordpress.org/secret-key/1.1/ 获取
d、添加 WordPress 站点
打开 ISS7.5,“添加网站”;
e、配置站点:
打开 http://localhost/wp-admin/install.php 输入博客标题和您的电子邮件
安装 WordPress
就到此位置,剩下的自己去探索吧!
5、WordPress 站点备份及迁移
最后再讲一下WordPress站点如何备份和迁移吧,
1、IIS站点备份很容易,只要直接备份 D:\Server_Core\wordpress 文件夹即可。
2、备份和还原 wordpress_db 数据库也是同样道理,也是直接操作 D:\Server_Core\MySQL\data\wordpress_db 文件夹,只是在操作前要停止 MySQL 服务。
进入控制面板,打开“服务”
找到 MySQL
停止此服务
打开 MySQL 数据库存放目录 D:\Server_Core\MySQL\data
对文件夹 wordpress_db 直接进行备份还原操作即可。
一切就这么简单!
Vengen
2009-1-1 发表
2009-1-2 修改

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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

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

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

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

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

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

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.

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.
