DEV Community

Cover image for WordPress developer environment setup
Ondřej Habina
Ondřej Habina

Posted on

WordPress developer environment setup

Hello, good people,

Let me start off by saying that I really enjoy being part of this community albeit so far only as a reader. It's time to also give back.

We will be learning how to install, self-host and access a WordPress website for development or practice purpose.

I recently decided to start learning WordPress, because I got clients that required their website to be easily manageable by them. Mind you, I'm still a beginner after about 7 months of learning front end, that is why Im only now starting with it.

I won't go into details on what WordPress is as I assume you already know and want to start if you're reading this.

I also would like to give credit where it is due, I'm only trying to make this content more accessible and aggregate more tips that you might have to search for.
The article I draw from the most is this one.

What you will need?
Image description

I will be using these tools in the article so I recommend downloading XAMPP and, of course, WordPress. :)

Image description

Let's dive in!

  1. RUN IT Once you have the XAMPP Control Panel open, simply press 'Start' for both Apache and MySQL module. Leave that be for now.

  2. CONFIG With WordPress downloaded and unzipped, head on over to where XAMPP is located on your machine and look for the folder 'htdocs'. Simply copy WordPress to this folder. I also recommend renaming it to something besides WP itself.

  3. ALMOST THERE Now go back to XAMPP. We need a database to connect to wordpress. In XAMPP control panel, next to MySQL click 'Admin'. Wait to be redirected, then click 'Databases'. Once there, simply name your database and click create. All you need to do now is to remember the database name.

  4. GREAT JOB You're basically ready to play around! Just paste this URL to your browser: "https://localhost/my-website/" where 'my-website' is what you named your WordPress folder in 'htdocs' in XAMPP.
    Follow along with WordPress installation. For database connection details, input database name as you created it in XAMPP, 'root' as username, blank password and leave rest the same. Then finish it up and behold! WordPress to be moulded to perfection by your skilled hands.

Additional Info

Why I decided to put this all into an article is because WordPress recently came out with a big update that changed a lot of the functionality.
WordPress usually basically forces the latest version on you, once you enter the CMS. Which, at times like these, might be a little problematic for people who need reliable source of information to start learning to use WordPress, this magnificent tool.

Turns out, there is a way to easily keep using an older version of WordPress without the fear of autoupdates.
To do that, all you need is to once again go to 'htdocs' folder in xampp on C:, into your wordpress project. Once there, find the file named 'wp-config.php' and open it using VS Code (or any other code editor of your liking). Go to the bottom of the file and paste in this code snippet:

define( 'WP_AUTO_UPDATE_CORE', false );

This will prevent it from updating and you can easily enjoy using the previous version of WordPress.

I hope you found this useful, please comment if you'd need me to clarify/edit anything.

Take care!

Top comments (1)

Collapse
 
diselban profile image
dieselban

Thank you for the useful information you provided.
I have just started learning wordpress. And I would love to learn more about it.
I have also recently created a very simple site.
dieselban.com/