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 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件