Local is a development tool to develop WordPress sites locally. It provides many useful features to initiate a new site, do backup and many more. It supports various operating systems including macOS, Windows, Debian and rpm-based Linux systems. This article describes the steps to set up and use Local in Fedora.
Attention! Local can’t be installed in Fedora 37 and above because the missing ncurses-compat-libs
package. You can follow this thread about the reason Fedora remove this package: https://bugzilla.redhat.com/show_bug.cgi?id=2129865. Based on the discussion in Local community forum, seems like fixing this issue is a low priority for now. So, for the reset of article, we use Fedora 36.
Install Local
- Visit https://localwp.com/releases, then download Local as an rpm package.
- Install Local by double-clicking the rpm file, then click “Install”
- When installation finished, click “Open” to launch the app
- Read the terms of service, then tick the checkbox and click “I agree”
- Turn on error reporting if you want
- installation finished. Click the close button (top right corner) if you want to use Local without creating an account. Click “Create a free account” or visit https://localwp.com/ to use Local with an account.
I recommend creating an account to unlock useful features like Live Link, Cloud Backups and many more.
- Here’s what the fresh installation of Local looks like. Click “Create a new site” or the plus (+) button on the bottom left corner to create a WordPress project
Start a New WordPress Project
- Open the Local app and click “Create a new site” or the plus (+) button on the bottom left corner of the window.
- Select “Create a new site” to start with a fresh WordPress installation, then click “Continue”
- Set the site name. By default, Local will prefills the domain name and the path of the project. We can still adjust it when needed.
- Choose the environment. Use the “Preferred” option if there are no special requirements. Otherwise, choose “Custom”.
- Define username, password and e-mail, then click “Add Site”
- Wait until the process is finished. Sometimes, we need to input our login credentials to allow Local execution. When the installation is finished, our site will be automatically started.
- When finished, click the “WP Admin” button to open the admin login page, and “Open site” to visit the site.
- Go to the “Database” tab and click “Open Adminer” to open the database explorer.
- Now, we can start the development of our site.
Back-Up a Local Site to The Cloud
Local supports integration with Dropbox or Google Drives to back up our site. This is one of my favourite features because we can back up the whole site including the database with a simple action. Follow these steps to enable Cloud Backups feature.
- Make sure we already have a Local account. Visit https://localwp.com/ to create an account.
- Login into Local from https://hub.localwp.com/login.
- Go to the Cloud Backups menu, then connect any storage.
Now we need to install the Cloud Backups add-on. It can be installed from the desktop app, but I recommend installing it manually using git because installing from the app takes a very long time and we can’t see the actual progress.
To install manually, we need Node.js and Yarn to be installed. Use a version manager like asdf or nvm because we need a specific version of Node.js to avoid errors due to incompatibility in version 17 and newer. I recommend asdf because we can manage versions for many development tools using it.
Install Node.js and Yarn using asdf:
- Follow this guide to install asdf: https://asdf-vm.com/guide/getting-started.html#_1-install-dependencies
- Install Node.js and Yarn
asdf plugin-add nodejs asdf install nodejs 16.9.1 asdf global nodejs 16.9.1 asdf plugin-add yarn asdf install yarn 1.22.19 asdf global yarn 1.22.19
- Install git-lfs
sudo dnf install git-lfs git-lfs install
- Clone the repo into the Local addons directory. It will take a long time because the addon includes large binary files. That’s why we need to install git-lfs in the first place.
git clone https://github.com/getflywheel/local-addon-backups.git ~/.config/Local/addons/local-addon-backups cd ~/.config/Local/addons/local-addon-backups git lfs pull
- Build the addon
yarn install yarn build
- Activate the addon from the desktop app by opening the Add-ons menu from the left sidebar, visiting the Installed tab, then toggling on the Cloud Backups addon. A message will be prompted on the top of the screen, then click Relaunch.
- Now, when any Local site is started, we can create a backup.
That’s all about setting up the basic functionality of Local to make WordPress development easier. Hope this helps!