How to set up WordPress for local development in Linux
WordPress has evolved into a CMS for the majority of websites on the Internet. Although you can pay a hosting company to keep your WordPress site on their server, it is the only choice suitable for ready websites.
If all you want to do is experiment with and familiarize yourself with CMS or start developing plugins / themes for WordPress, then this is how you can set up everything you need with XAMPP, plus WordPress itself. Linux, to learn, develop or do whatever you want without paying a dime.
Install XAMPP
This article will follow the path of using ApacheFriends' easy XAMPP installer, turning the installation of Apache, MariaDB, and PHP into a simple task, just click 'Next' and you 're done.
1. Visit the ApacheFriends website and download the latest 'XAMPP for Linux' installer.
2. Since the article is in download stage, please visit Bitnami website and download the latest WordPress installer for Linux.
3. Open a terminal and change the directory where you downloaded the two files into something like:
cd Downloads
Make two executable files:
chmod +x xampp-*-installer.run chmod +x bitnami-wordpress*-installer.run
4. Run the Apache installer with:
sudo ./xampp-*-installer.run
5. Accept the defaults and complete the process by clicking 'Next>' on each setting screen. When done, activate the 'Launch XAMPP' feature and click 'Finish'.
6. From the window that appears and on the 'Welcome' tab , click 'Open Application Folder' and minimize the pop-up file manager window. We will need this window later, so don't close it.
7. Go to the 'Manage Servers' tab and make sure that both MySQL and Apache Web Server are running. If not, select them and click 'Start' at the top right. You do not need a ProFTPD server because you will have local access to all files, so you can leave this server in 'Stopped' mode .
8. Check if everything works or not by activating your favorite browser and visiting the 'localhost' address. The welcome page of XAMPP will appear.
Note : To start the stack in the future, use the command:
sudo /opt/lampp/lampp start
If, instead, you want to start and stop individual servers through the GUI provided, enter:
cd /opt/lampp sudo ./manager-linux.run
If you have 64 bit installed, the second command will be:
sudo ./manager-linux-x64.run
Install WordPress
1. With XAMPP running, continue with Bitnami's WordPress installation. Run it with:
sudo ./bitnami-wordpress*-installer.run
2. Click Next , leave the default installation directory, pausing at the 'Create Admin account' screen . Enter the account details you want to use to log in to your upcoming WordPress installation. Leave the MySQL Password box blank .
3. The installer will also give you an option to change the pre-selected (and too general) Blog name. If you set the goal of turning this page into an actual site hosted on an actual server and allow others to access, you should enter the user name and not the temporary name. This will be helpful in keeping MySQL find and replace actions to a minimum, when you move your site to a remote server.
4. Since everything is going to happen locally, you don't need to get notified about the status of your site. You can skip the 'Configure SMTP Settings' tab and support mail now.
5. At the 'Installationtype' tab, select 'Development Settings' instead of 'Production Settings' , because you are setting up the development environment and this is not a ready site.
6. For the same reason, uncheck 'Launch wordpress in the cloud with Bitnami' .
7. Click 'Next' to proceed with the WordPress installation of Bitnami. Once completed, test it as before, but this time use the local WordPress URL:
localhost/wordpress
Your blog welcome screen will appear, using WordPress default settings and themes.
Now that you have WordPress installed locally and working, to log in to the admin panel, visit the URL:
localhost/wordpress/wp-login.php
Alternatives to XAMPP
As a final note, if you want absolute control over all aspects of your installation, you can follow the path entirely manually. You can install Apache, PHP and MySQL or a number of alternatives, configure each one, then download and install WordPress yourself. This way, you will also become more familiar with the technologies included in WordPress.
The reason why the article chooses the Easy Way (XAMPP) is because most people who want to use WordPress will not care about additional features. And they want to avoid facing them unless it's absolutely necessary.
If you prefer an option that combines the complete simplicity of the XAMPP module method and Bitnami WP, which can turn your PC into a full LAMP server, you can install WordPress via Docker. This option is more complex than the approach the article tested but will have the added advantage of keeping everything virtualized, without having to install additional services on the actual operating system.
The difference is that XAMPP installs the necessary 'infrastructure' for WordPress (Apache, PHP and MySQL) equivalent to standalone applications in the operating system, while Docker keeps everything in a virtual work environment. chemistry, containing all the dependencies.
Docker still depends on local factors of the system, however, adding the missing dependencies for WordPress is still important. For larger groups collaborating on joint projects in which every member will benefit from accessing the same server but locally, a Vagrant & VirtualBox installation may be a good choice. Best.
However, please note that the full virtual environments also contain full operating system files and therefore, are larger and more difficult to maintain, as they require you to keep the server up to date and virtual operating system. That is why it is not possible to consider them the best choice for the average individual user, with a personal blog, but for professional developers and collaborative teams in projects. bigger.
You should read it
- Which platform is better for WordPress.com and WordPress.org?
- Why is WordPress free?
- 5 mistakes everyone mistakenly thinks about WordPress
- What's new in WordPress 5.4?
- How to add new posts on WordPress
- Keyboard shortcuts for editing on WordPress
- Squarespace and WordPress - Which one is better?
- How much does it cost to build a WordPress website?
- Wix and Wordpress - Which one is better?
- How to migrate blogs from WordPress.com to WordPress.org
- Instructions for installing WordPress on the Vitual Server with Cloud9
- 8 Useful WordPress Tricks Worth Checking Out
Maybe you are interested
390,000 WordPress Accounts Stolen in Large-Scale Attack
How to create WordPress custom fields to add metadata
How to clear WordPress cache
10 Best Website Builders for WordPress
How to use Net Writer to write blogs on Windows 10 - WordPress and Google Blogger support
8 key differences between WordPress and Shopify