WordPress安装期间大约404

时间:2019-09-18 02:07:35

标签: php wordpress

我正在学习wordpress,我想我已经按照安装说明安装了它,但是结果是//Recipes.js import React from "react"; import axios from "axios"; import LoadingIndicator from "./loadingIndicator" const API_KEY="f562842f0ff6b2d4fd24b9601aeb5e1b"; const API_KEY2="bfb76b78b11e7308cc3c027865a508dd"; const API_KEY3="726237903540780fabd8614c1fe4e75d" class Recipes extends React.Component { state= { ingredients:[this.props.ingredients], loaded:false } handleChange=(e)=> { this.setState({ [e.target.id]: e.target.value }) } handleSubmit=(e)=> { e.preventDefault(); console.log(this.state); axios.get(`https://www.food2fork.com/api/search?key=${API_KEY3}&q=${this.state.name}`) .then(res=> { console.log(res) this.setState({ ingredients:res.data.recipes, }) }) } render() { const recipeList = this.state.ingredients.length >0? this.state.ingredients.map((ingredient)=> { return( <div key={ingredient.recipe_id}> <img className="recipeImage" src={ingredient.image_url}/> <p>{ingredient.title}</p> </div> ) }) : <LoadingIndicator loaded={this.state.loaded}/> return( <div style={{padding:50}}> <form className="form" onSubmit={this.handleSubmit}> <label>Food Name or Ingredient: </label> <input id="name" onChange={this.handleChange} className="formText" type="text" placeholder="type in ingredient or recipe" /> <button className="btn waves-effect waves-light" type="submit" name="action">Submit</button> </form> <div style={{marginTop:100}}> {recipeList} </div> </div> ); } } export default Recipes; //LoadingIndicator.js import React from 'react'; import { css } from '@emotion/core'; // First way to import import { ClipLoader } from 'react-spinners'; // Another way to import. This is recommended to reduce bundle size const override = css` display: block; margin: 0 auto; border-color: red; `; class LoadingIndicator extends React.Component { constructor(props) { super(props); this.state = { } } render() { return ( <div className='sweet-loading' style={{marginTop:150}}> <ClipLoader css={override} sizeUnit={"px"} size={350} color={'#123abc'} loading={this.props.loading} /> <h1>LOADING...</h1> </div> ) } } export default LoadingIndicator;

  1. 下载wordpress(确定)
  2. 在您的Web服务器上为WordPress创建数据库,并创建一个具有所有输入和修改权限的MySQL用户。 (好吗?)
  3. 将wp-config-sample.php文件重命名为wp-config.php。(确定)
  4. 使用您喜欢的文本编辑器打开wp-config.php并填写您的数据库信息。(可以吗?)
  5. 将WordPress文件夹放在您要放置它的服务器上(确定吗?)
  6. 在您喜欢的浏览器中访问wp-admin / install.php以启动安装程序(404)

为什么?

enter image description here

enter image description here enter image description here

enter image description here enter image description here

1 个答案:

答案 0 :(得分:0)

您是否正在使用Web服务器运行wordpress网站(例如:xampp,wamp v ...)。您是否正在将变量DocumentRoot的目录更改为httpd.conf中的Directory并指向wordpress目录?