新建一个数据库
安装wordpress
1.选择语言
2.配置数据库
database.png
3.设置站点名称、用户名、密码balbala
login.png
4.然后登陆就完事了
index.png
安装主题
1.在菜单栏Appearance下Themes
2.把主题文件放到wordpress/wp-content/themes/xxxx_file
3.新建一个index.php或者把index.html改成index.php
4.新建一个style.css
/*
Theme Name:theme_name
*/
这时候图片 css js都404,需要使用get_stylesheet_directory_uri()找到路径
5.新建functions.php
//get_stylesheet_directory_uri()返回样式目录
define('URL',get_stylesheet_directory_uri());
<img src="<?= URL ?>/Photo/museum-of-islamic-culture-1.jpg" alt="">
这时候样式和图片都可以正常显示
6.主题还需要一个预览图
在主题文件下预览图名为screenshot.png