惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
Jina AI
Jina AI
GbyAI
GbyAI
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
P
Proofpoint News Feed
The Cloudflare Blog
H
Help Net Security
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
量子位
博客园 - 聂微东
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
月光博客
月光博客

Pressable

Pressable Achieves Secure Hosting Alliance Certification | Pressable How Pressable MCP Is Changing The Game For WordPress Agencies: A Live Breakdown With Matt Medeiros And Phill Clapham | Pressable April Product Update: Navigation, Organization, And Efficiency | Pressable White-Label WordPress Hosting For Profitable Agencies | Pressable A Guide To Client Onboarding For WordPress Agencies| Pressable WordPress Plugin Management For Scalable Agencies | Pressable WordPress Maintenance Contracts For Agencies: A Complete Guide | Pressable 6 Essential SOPs For WordPress Agencies | Pressable Pressable MCP: Control Your WordPress Hosting With AI. | Pressable WordPress Hosting Cost: Pricing Tiers And What To Expect | Pressable WordPress Performance Budgets: Setting And Monitoring Goals | Pressable WordPress Automation With No Code Automation Tools | Pressable Implement Single Sign-On (SSO) In WordPress | Pressable How To Build A Real Estate Site On WordPress | Pressable Headless WordPress Showdown: Next.js Vs Gatsby | Pressable How To Automate White-Label WordPress Hosting With WHMCS | Pressable Developer Toolkit Update: Automation & UI Enhancements | Pressable How To Build A DXP Platform With WordPress How To Boost WordPress Agency Client Retention: 4 Strategies White Label WordPress Admin For Agency Clients Performance Testing For WordPress Agency Client Sites Performance Testing For WordPress: A Framework For Agency Client Sites How To Upload A Video To WordPress | Pressable How To Mitigate The Impact Of AI Scraper Bots On WordPress Sites WooCommerce ERP Integration: Automate Your Back Office WordPress Personalization: How To Display Tailored Content To Visitors | Pressable WooCommerce Conversion Rate Optimization: A Data-Driven Approach How To Price Your Online Course: WordPress Monetization Guide 7 Ecommerce KPIs You Should Be Measuring | Pressable WooCommerce Vs. BigCommerce: Which Is Best For Your Business Needs? | Pressable WooCommerce Performance Troubleshooting: Diagnosing Speed Issues Step-by-Step | Pressable
How To Setup A Local WordPress Development Environment
Zach Wiesman · 2018-05-01 · via Pressable

A person setting up a local development environment for their WordPress site.

Ask Your Favorite AI

Copy the link to a markdown format of this article for ChatGPT, Claude, Gemini, or your favorite AI.

When you’re building out a WordPress website you’re going to have a few different options for building and deploying your website.

You can either build and make changes to your site live (not recommended), use a staging server, or setup your own local development environment.

Setting up a solid local WordPress development environment can be a crucial part of your workflow, and give you an easy and stress-free development experience. Below you’ll learn what a local development environment is, why using one is beneficial, and how to set it up yourself.

What Is a Local Development Environment?

A local development environment allows you to setup a server environment on your own machine, instead of using the server environment provided by your hosting company.

This allows you to customize your site without worry that’ll it’ll break, and make all kinds of changes, before pushing your site online. The helps to eliminate any risk when building your site and can make the development process much less stressful.

Even though you’re not working on your site live, your site will look like it’s live in your browser. Your browser will simply be referencing the files stored locally on your computer, but no one else will be able to access or view your site.

To setup a local development environment you’ll need a few additional tools. Depending on your need, you  have a variety of tools available to help create your local environment, like Desktop Server and WP Stagecoach.

Why You Should Use a Local Development Environment

One huge advantage of developing your site locally on your computer is that you can work on your site without being connected to the internet. If you have slow wifi, or you’re traveling, you can continue to work without having to endlessly search for a wifi signal.

Your site will also be secure and free from prying eyes until you’ve actually completed the project. Plus, you won’t run into any server performance issues or spend endless time waiting for your site to refresh. The performance of your site will simply depend upon your local machine.

A local development environment will allow you to maintain high levels of security while testing your site and let you ensure there are no bugs or fixes that require your attention.

However, if you do need to show progress on a site you’re building, then you may want to opt for a staging environment, which allows you to host your site on a live server, while it’s still shielded from the general web.

This gives you more flexibility in showcasing your work, while still being able to access your site from any computer or location and improving the security.

How to Setup a Local WordPress Development Environment

If you’re sold on creating your own local WordPress development environment, then you’ll need a few tools to help you get started. There is no perfect solution for setting up your local environment, so it’s important to choose the tools that are the best fit for your needs.

The steps below will help you set up your local server environment, with the minimum amount of technical requirements possible.

1. Choose a Local Server Environment

Using the right tools will speed up the time it takes to set up your local development environment. There are numerous options to choose from, but the tools below are the easiest and most commonly used:

  • MAMP – MAMP will give you a complete local environment for developing your WordPress site. This solution will bundle everything you need to get your server up and running together, so you don’t have to bring multiple tools together. It’s available for both Mac and Windows.
  • XAMPP – XAMPP is a great open-source tool that’ll work across Mac, Linux, and Windows machines. Plus, it’s one of the easier options to set up and use. Once you’ve installed the tool you can quickly install the WordPress software stack, which will allow you to start building your WordPress site immediately.

2. Pick a Text Editor

If you’re an experienced developer, then you probably already have a preferred text editing tool to edit your code. But, if not, then you’ll want to find a solid text editor.

A text editor that’s built for developers will help to increase your programming efficiency and avoid making errors in your work.

Some commonly used solutions that are geared towards WordPress development include:

  • PhpStorm – This editor supports WordPress development right out of the box, and will atomically detect if you’re building a site in WordPress.
  • Atom – This is a relatively new open source editor that easy to use, has an active community, and has a number of WordPress-specific add-ons.
  • NetBeans – This is a full-function editor that’s been around since the 90s. It includes impressive features like a built-in debugger and numerous WordPress add-ons.
  • Sublime Text – This editor is very lightweight, fast, and a pleasure to use, while coming equipped with WordPress development add-ons.
  • Coda – This is a Mac-only editor that’s very lightweight and includes WordPress-specific plugins.

3. Select a Development-Oriented Browser

Most modern web browsers are equipped with developer tools that allow you to test and debug your site directly from the browser window. Two of the most commonly used development-oriented browsers include Chrome and Firefox.

Chrome allows you to enable developer tools right within the browser settings, while Firefox even offers its own browser built for developers called Firefox Developer Edition.

4. Install the Right Tools and Plugins

Before you start building your site you’ll want to enable WordPress debugging features. This will allow you to find any glaring WordPress errors or bugs and fix them before you push your site live.

To enable debugging you’ll need to locate your wp-config.php file and add the following piece of code (which will turn on the debugging feature):

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );

You can also install a plugin like Log Viewer, which will allow you to view and clear your debug log.

Other tools and plugins you might want to install include WP-CLI, which will streamline the development experience or Query Monitor, which acts as a comprehensive debugging plugin.

5. Start Building Your Site!

With your local development environment created, WordPress installed, and the right tools and plugins active it’s time to start building your site.

Setting up a local WordPress development environment might seem like a lot of work, but developing a site on your local machine can become a crucial part of your development workflow. It’ll not only make you more efficient, but you’ll be able to build a site without the worry that something will break.

If you’re looking for a high-performance managed WordPress host to host your site once you’ve built it in your local development environment, we hope you consider Pressable.

Zach Wiesman

Zach brings a wealth of knowledge to Pressable with more than 15 years of experience in the WordPress world. His journey in WordPress began with creating and maintaining client websites, fostering a deep understanding of the intricacies and challenges of WordPress. Later, his knack for problem-solving and commitment to service led him to pursue a role at Automattic, where he excelled in providing customer support for WooCommerce. His expertise extends beyond technical proficiency to encompass a deep understanding of the WordPress community and its needs. Outside of work, Zach enjoys spending time with his family, playing and watching sports, and working on projects around the house.