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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
爱范儿
爱范儿
Engineering at Meta
Engineering at Meta
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
L
LangChain Blog
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
Microsoft Security Blog
Microsoft Security Blog
P
Proofpoint News Feed
腾讯CDC
GbyAI
GbyAI
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
F
Fortinet All Blogs
Y
Y Combinator Blog
V
V2EX
A
About on SuperTechFans

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
Master WordPress & Laravel Homestead Setup | Pressable
Pressable · 2016-12-22 · via Pressable

WordPress + Laravel Logos

Ask Your Favorite AI

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

Laravel Homestead is a prepackaged Vagrant box that provides a development environment for Laravel. It’s packed with PHP, MySQL, Nginx and everything else you need to run a local web server. Homestead is great for developing in Laravel, but can it also work for WordPress? Absolutely!

I’ve been using Homestead for my local WordPress and Laravel development for the past year. While there are many options for developing WordPress sites in a local environment, you can’t go wrong with Homestead. The setup is both powerful and easy to use. Best of all, Laravel Homestead is free.

I’ll show you how to set up your own local WordPress development environment on Laravel Homestead but, first, I recommend you watch my video tutorial on getting started with Laravel Homestead:

Let’s Get Started

First, you’ll want to edit your Homestead.yaml file. If you’re using a Mac, you’ll find this file at ~/.homestead/Homestead.yaml. Once you’ve opened the file in your favorite editor, add the following lines:

– map: somewordpress.dev

 to: /home/vagrant/Code/somewordpress.dev/public

databases:

   – somesite_db

The yaml file is picky with spacing and tabs so be sure to match what’s already there. After you save the file, you’ll need to provision the server again:

cd ~/Homestead

vagrant reload –provision

This will reload your local development environment with the the new setup for the new local site. Once this is done, you’ll need to edit a local file to tell your browser where to point to. Our end goal is to type somewordpress.dev in the browser and have that route to the local installation of our web server.

You’ll need to edit the /etc/hosts file and add the following line:

192.168.10.10 somewordpress.dev

Next, we’ll install WordPress in Homestead. Make a directory inside your project folder area ~/Code/somewordpress.dev/public. This is where we’ll install WordPress.

Download a fresh copy of WordPress and save the contents inside the public folder. Our web server points to this directory, allowing us to access WordPress via our browser.

Now, we change the name of wp-config-sample.php to wp-config.php and add the following lines for our database:

define(‘DB_NAME’, ‘somesite_db’);

/** MySQL database username */

define(‘DB_USER’, ‘homestead’);

/** MySQL database password */

define(‘DB_PASSWORD’, ‘secret’);

Don’t forget to get your unique auth keys at the URL provided in the config file and to replace the appropriate lines of your config with your auth keys.

We’ve now reached the moment of truth. Fire up your browser and visit somewordpress.dev. If you see the WordPress installation screen, you’ve successfully installed WordPress on Laravel Homestead.

It’s easy to set up Laravel Homestead for your local WordPress development projects. You can also use Laravel