duanbinmi8970 2016-08-09 01:15
浏览 42
已采纳

如何将WordPress网站移动到我的计算机上进行开发?

I was just hired to work in web design with WordPress and I'm struggling because I'm not experienced with the platform. My job is, basically, take the design made in Adobe Illustrator and build the layout in HTML and CSS.

Today I was assigned a site that's already online and had to build the new layout. My instructions were to activate the new template in the WordPress wp-admin, to create the new files (index.php, header.php, footer.php and style.css) in the FTP server and build from there.

Everything OK with that except that when I'm working on the site (maybe 3 or 4 hours), the site is kinda down because I'm uploading the new (incomplete) layout, am I explaining correctly?. E.g., if the web address is theclientsite.com I go to theclientsite.com/wp-admin/themes, define and activate new theme, write the code and test it directly in the browser going to theclientsite.com.

The question is: is there a way to work locally with the WordPress installation? I mean a way to test the site in something like localhost/theclientsite in the browser. My intuition says that the answer is YES, because we're talking about php code. But, as I said, I'm not experienced in the WordPress platform. I don't know if I need to be connected to a WordPress's server or something like that, or if I need to install something in my machine.

Any help, guide or tutorial is welcomed and will be appreciated. Thanks in advance for your answers.

  • 写回答

3条回答 默认 最新

  • duancan8382 2016-08-09 01:32
    关注

    Yes, it is possible to work offline by installing locally:

    • Apache / Nginx
    • PHP
    • MySQL

    That can be done...:

    You will have to edit your host file to map the domain.com to your localhost (127.0.0.1). The reason is that, by default, WordPress is not domain agnostic, which means absolute links (including the domain) are stored in the database. Otherwise, you will need to edit the data to map it to localhost.

    As you are new with WordPress, I will remind you to backup the website BEFORE doing any change. A free tool like BackWPup can do the job to backup all files and the database.

    The changes you made on the website were made directly in production (meaning on the live site). That is a really bad practice, as you probably know why now, because your visitors see and incomplete and buggy website.

    That is why you need a dev environment where you can build and test everything. If you did not do any backup and feel screwed, you can install a maintenance plugin like Ultimate Coming Soon Page and configure it to tell your visitors that the site is having a make over and come back later.

    As for tutorials, I would start with How to install WordPress with WampServer. First, you will understand how to install WordPress... in general. Once you understand this part, you are ready to export an existing website and import it locally. I would suggest to read more about How move a WordPress website locally.

    This is a start! Use Google as you go... it will help a lot! :-)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?