DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report

Getting Started With WordPress and Che

Eclipse Che was built with the goal of simplifying project configuration in mind. The most recent release boasts rich PHP and database features that make Che the perfect solution for WordPress development. In this post, we will walk you through some of the basics of using Che with WordPress.

Tyler Jewell user avatar by
Tyler Jewell
·
Mar. 22, 16 · Tutorial
Like (6)
Save
Tweet
Share
7.19K Views

Join the DZone community and get the full member experience.

Join For Free

Eclipse Che was built with the goal of simplifying project configuration in mind. The most recent release boasts rich PHP and database features that make Che the perfect solution for WordPress development. In this post, we will walk you through:

  • Setting up Che
  • Importing a WordPress Project
  • Starting Your MySQL Server
  • Running Your Project
  • Saving Your Workspace

Get Started With Wordpress and Che

Create a new Wordpress project with a dedicated database.

1. Start Che

/bin/che run

### Open browser to:
http://localhost:8080

If you do not have any projects in Che, you'll be redirected to a startup page to create a new project.

2. Import a Wordpress Project

Click New Project and import a Wordpress repository and set up the right environment for it.

Select Source

Let's import WP from an official WordPress GitHub repo. 

Select Stack

Che offers a certified PHP image with Apache2, MySQL, git, curl and a number of popular PHP extensions. Dockerfile. 

Configure Workspace

Give your workspace a nice name and configure RAM, i.e. apply the memory limit to a workspace machine.

Create the Project

Select Create Project. The project construction process goes through a number of steps including creating a new workspace, downloading an image to use for the workspace environment, instantiating that environment, installing Che services into the workspace, and then creating your project.


Click the Open in IDE button to open your project in the IDE.

3. Start MySQL Server

After the project is successfully created, you can start MySQL server either in the terminal (you can find it on the Consoles panel and open it by clicking + button) or using a command widget (CMD) - sudo service mysql start.

We have already created a sample DB in the base image:

ENV CHE_MYSQL_PASSWORD=che
ENV CHE_MYSQL_DB=che_db
ENV CHE_MYSQL_USER=che

You may verify that the DB is there and MySQL is running: mysql -u che -p che.

4. Run Your Project

Let's start Apache server. You can do that in the terminal, however, using a Commands Widget is a better option. Go to CMD > Edit Commands… menu, click + button at Custom section and paste your command name, command itself here.

Here are some commands that you may use: 

# Apache start
  sudo service apache2 start && sudo tail -f /var/log/apache2/access.log -f /var/log/apache2/error.log

# Apache restart
  sudo service apache2 restart

# Apache stop
  sudo service apache2 stop 

Preview URL is another important object. It will be http://${server.port.80}/${current.project.relpath}.

${server.port.80} returns host and port, while ${current.project.relpath} will be interpreted as a relative path to your project (relative to /projects which is DocumentRoot for Apache in this environment).


Run Apache, click the preview URL and find your WordPress project started there. Follow the WordPress guide to start your first site.


You will be prompted to connect your MySQL database (see details above). You can also connect an external database.

A few steps to install WP and voilà, it’s done.

5. Snapshot Workspace

The last step is to save your workspace.

Go to Machine Perspective, choose Machine > Create Snapshot. It will create a new image which will be used to load the workspace based upon the current contents of the environment.

Note, that snapshot images are stored in a Docker registry. You should set up Docker registry on your local machine first, or use an external registry. Find more info in our Node Tutorial.

To download Che, find more technical documentation, or to learn more about the all-new Eclipse Che and how Che works, please visit eclipse.org/che.
Download | Contribute | Docs | Features

WordPress

Published at DZone with permission of Tyler Jewell, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How We Solved an OOM Issue in TiDB with GOMEMLIMIT
  • Master Spring Boot 3 With GraalVM Native Image
  • Introduction to Container Orchestration
  • Best CI/CD Tools for DevOps: A Review of the Top 10

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: