This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

📣 Join the live AMA session with Adam Silverstein on open source and WordPress core! Register Now →

How to Launch WordPress on Local Environment with wp-now

Updated on June 20, 2023

6 Min Read
wp-now-launch-a-local-environment

As developers, we understand the challenges of setting up a local environment for WordPress projects. It can be exhausting, from handling configurations to installing libraries and managing licenses. Our true joy lies in coding, building projects, and delivering products that help people.

But thankfully, wp-now streamlines the process of setting up a local WordPress environment. With automatic mode detection and seamless configuration, wp-now ensures a quick and efficient setup, whether you’re working on an individual plugin or an entire website.

And the best part? It simplifies switching between PHP and WordPress versions with just a simple configuration argument.

Powered by the capabilities of WordPress Playground, wp-now only requires Node.js to operate effectively. In this detailed guide, we’ll walk you through the process of launching WordPress on your local environment using wp-now, empowering you to focus on what you do best: building outstanding WordPress projects.

What is wp-now?

wp-now, an innovative NodeJS application powered by WordPress Playground, revolutionizes how developers launch WordPress on their local environments.

With wp-now, launching WordPress on your local environment becomes a breeze. Using WebAssembly (WASM) technology, it creates a php-wasm instance and seamlessly downloads the selected WordPress version. By mounting the necessary directories in a virtual file system (VFS), wp-now ensures compatibility across all platforms – Mac, Linux, and Windows.

With its cutting-edge features and simplified setup, wp-now eliminates the complexities plaguing manual installations, allowing developers to to dive straight into coding and project-building endeavors.

It was created by a team of developers who recognized the time-consuming nature of configuring servers, installing dependencies, and managing environments. By automating these processes, wp-now provides a seamless experience for developers, enabling them to focus more on coding and building their WordPress projects.

Requirements For WordPress Local Environment With wp-now

Did you know that you can launch a Local Environment in seconds with wp-now? But how? And what are the requirements?

To answer your question, the only requirement is npm, and you’ll be able to stop using Docker.

You may also wonder, “what is npm?” Don’t worry, we’ve got you covered.

npm stands for Node Package Manager. It is a package manager for JavaScript, primarily used to manage and install packages or libraries for Node.js projects. It is bundled with the Node.js runtime environment and is automatically installed when you install Node.js.

npm provides a vast registry of reusable JavaScript code packages, which developers can easily install and use in their projects. It simplifies the process of managing dependencies and eases integrating third-party libraries into your applications.

Install Node Package Manager (NPM)

Here’s how you can install the Node Package Manager:

  • First, visit Node.js official website.
    Download the latest version of Node.js & install it on your computer.

Download Node JS

  • Click Next to initiate the setup wizard.
  • Accept the agreement, select the location and complete the installation process.

node js setup wzizard completed

  • The image above shows that Node.js has been successfully installed on my computer.
  • Now, the next step is to verify the installation. For this, you need to open the Command prompt.
  • Run the following command.
npm
  • The image below shows that the npm is successfully installed along with the Node.js on my computer.

NMP Installed Successfully

Install wp-now Directly From npm

You can also install wp-now directly from Npm, follow the steps below:

  • Run the following command on the command prompt.
npm install -g @wp-now/wp-now

install wp-now directly from Npm

  • The installation process will start.

wp-now Installation 1

wp-now Installation 2

wp-now Installation 3

  • The command has been executed successfully.

wp now installation complete

  • Once installed, you can also start a new server with the command below:
wp-now start

WP now start

  • Yahoo! wp-now is showing its magic and you can see that WordPress is running on your local environment.

Want to change the PHP or WordPress version?

  • You can. Switch to different PHP & WordPress versions by using the following command:
wp-now start --wp=5.9 --php=7.4

WP and PHP version in wp-now

Want to execute a specific PHP file?

  • You can execute any specific PHP file with wp-now by running the following command:
wp-now php wp-config.php

WordPress Playground: Brief Overview

wp-now is powered by WordPress Playground, which is an environment that runs the entire WordPress website on your browser. It makes WordPress instantly accessible for users, learners, extenders, and contributors.

Visit playground.wordpress.net to set up your own private, in-browser WordPress instance. Once you’re there, the possibilities are endless.

Also, you can create and customize themes, build complete websites, test plugins, and explore many other features. The WordPress Playground provides a convenient and hassle-free environment for you to unleash your creativity and accomplish your WordPress-related goals.

WordPress site on Playground

Web browsers are not the only medium; WordPress Playground works in Node.js, mobile apps, VS Code, and more. You might be wondering, how is this possible? Well, it very much is, as the playground uses the latest cutting-edge technologies to make the key WordPress dependencies work in JavaScript.

  • PHP operates as a WebAssembly binary.
  • MySQL is substituted with SQLite through a WordPress plugin.
  • The web server is implemented using JavaScript as a Service Worker.

You can check the WordPress Playground documentation to learn more about these concepts.

The good thing about the playground is that you can integrate it with your application by using a single <iframe> tag.

Benefits of Using a Local Environment

We know that we can create the local environment via XAMPP server, but the process is lengthy.

The process requires you to install the server first, download the WordPress file, unzip it, and place it in an accurate folder. Then you have to initiate the WordPress installation process, and only after that, you’ll be able to run WordPress on local environments.

There are several benefits of using a local environment like wp-now for WordPress development:

  • Fast and Efficient Setup: wp-now utilizes automatic mode detection, making the setup process quick and hassle-free. This saves time and allows developers to get started with their projects promptly.
  • Versatility: Whether you are working on a plugin or an entire website, wp-now allows you to switch effortlessly between PHP and WordPress versions. This flexibility enables developers to test compatibility and ensure optimal performance.
  • Isolated Testing Environment: With wp-now, you can create a local environment that is separate from your live website. So, you get a safe and controlled space to experiment & test new themes, plugins, or configurations without affecting the live site. It helps mitigate the risk of breaking anything on the production site.

Conclusion

In this detailed guide, we explored the process of launching WordPress in a local environment using wp-now. By following the steps outlined in this guide, you can quickly and efficiently set up your local development environment for WordPress projects.

By utilizing wp-now, developers can save valuable time and focus on coding and building their WordPress projects rather than getting caught up in complex setup procedures.

With this comprehensive guide, you are now equipped with the knowledge to confidently launch WordPress on your local environment using wp-now. Embrace the convenience and efficiency that wp-now brings to your WordPress development journey, and take your projects to the next level. Happy coding!

Share your opinion in the comment section. COMMENT NOW

Share This Article

Danish Naseer

Danish Naseer is a WordPress Community Manager at Cloudways. He is passionate about designing, developing, and engaging with people to help them. He also actively participates in the community to share his knowledge. Besides that, he loves to watch documentaries, traveling and spending time with family. You can contact him at [email protected]

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now