https://github.com/souptik2001/wordpress.setup
WordPress setup with `lando start`.👌
https://github.com/souptik2001/wordpress.setup
automation jinja2 lando php python wordpress
Last synced: 3 months ago
JSON representation
WordPress setup with `lando start`.👌
- Host: GitHub
- URL: https://github.com/souptik2001/wordpress.setup
- Owner: Souptik2001
- Created: 2022-04-15T20:53:42.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-15T19:57:41.000Z (about 3 years ago)
- Last Synced: 2025-01-17T14:44:44.316Z (over 1 year ago)
- Topics: automation, jinja2, lando, php, python, wordpress
- Language: Shell
- Homepage: https://souptik.dev/blog/wordpress-lando-setup-v2
- Size: 21.3 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My WordPress Lando Setup ~ Souptik Datta
**Many folder structure conventions are my personal choice. If you want to edit the folder structure then make sure to change the places where this folder structure is used(mainly in the `.lando.yml` and `setup.sh` files), otherwise the setup will break.**
**Along with the super easy setup one more benefit you will get is that wordpress-core will be present only once, yet providing the flexibility to edit customizable files like `wp-config.php`, `wp-contents` directory, server and php configuration files, etc.**
## Blogs✍
- [WordPress Lando Setup🐳](https://souptik.dev/blog/wordpress-lando-setup)
- [Update: WordPress Lando Setup v2🐳](https://souptik.dev/blog/wordpress-lando-setup-v2)
## Before Using:
- Before using my this setup be sure you have the following things installed (External dependencies):
- `Docker`.
- `Lando`.
- `Git`.
- And obviously a little knowledge about `WordPress(🤔)` is good.
## Credentials:
After creating a site:
- Your site will have a username and password(both same) of - `admin`.
- And the database name will be `wordpress`. And the username will be `wordpress` and password will be also `wordpress`.
After creating a site with VIP template:
- Your site will have a username and password(both same) of - `sadmin`.
- The database name, username and password will be the same as above.
## Steps to set-up:
- Clone this repo in folder `~/wordpress/` using the command:
```bash
git clone https://github.com/Souptik2001/wordpress.setup.git ~/wordpress/wordpress.setup-DO-NOT-DELETE
```
OR
```bash
git clone git@github.com:Souptik2001/wordpress.setup.git ~/wordpress/wordpress.setup-DO-NOT-DELETE
```
**( The name used here `wordpress.setup-DO-NOT-DELETE` is important because that name is used in the lando config file ).**
- Now you can just run `lando start` here only and that's it you have a WordPress site ready.
- But if you are more into development you most probably will have the wp-content folder's content already.
**From here you have two ways to go**
**Automated😎 -**
- Just make sure you have cloned the `wordpress.setup` repo in `~/wordpress/wordpress.setup-DO-NOT-DELETE`.
- And now there inside there you will find a script named `setup.sh`.
- Just run the script as so - `setup.sh app_name /path/where/the/proj/should/be/created wp-content_repo_url(optional)`.
- And your app is ready!
**Manual🧐 -**
- So, in a different folder copy the `.lando.yml`, `wp-content`(fallback), `.lando` files.
- And now you can get your's `wp-content` folder and replace this default `wp-content` folder.
- In the first line of `.lando.yml` file edit the `name` parameter. ( Important ).
- Now run `lando start`.
- Here only you will get a `wp-config.php` file which you can edit as per you wish.
## Arguments:
There are a lot of arguments you can pass in the command to customize the WordPress installation you create, like WordPress, PHP and node version, whether we wan't multisite or not, etc.
```
Usage: setup.sh [name_of_the_project] [path/to/the/folder/to/setup/project] [(optional)ssh_or_https_link_to_clone_wp_content_repo]
Arguments:
--wp : WordPress version.
--php: PHP version.
--node: Node version.
--multisite: Whether to create multisite or single site. yes OR no.
--multisitetype: Type of multisite. subdomain OR subdirectory.
--vip: Whether to create VIP template site or not. yes OR no.
--help: Display this help menu.
Example: setup.sh [project_name] ~/wordpress --multisite=yes --vip=yes --wp=6.2.2 git@github.com:[repo]
```
Or you can get this help instructions by executing `./setup.sh --help`.
## Memcache support:
Memcache( or persistent object cache ) is present with every site installation. But to use it follow the following steps-
- Go to `wp-content/plugins/memcached`
- Copy the file `object-cache.php` to `wp-content` directory.
## TO-DO:
- [x] Ability to add separate `wp-config.php` files for different sites.
- [x] Add a shell script to complete the setup following the above steps ( only contains basic level of error handling ).
- [x] Add far better error handling in the shell script.
- [x] The WordPress directory in the project directory should have a only read link to the original WordPress directory so that we get autocompletion.( High Priority)
- [x] In the project directory there should be a hard symlink to the wordpress core and the permissions should be only read as written in the above point.
- [x] The project should use that hard-symlink as the wordpress core( because that from one project user does't upgrade WordPress core ).
- [x] Because of the above point you will not be able to upgrade WordPress from the admin dashboard. For that we have to somehow select that from command line utility. Keep some versions of the wordpress core in the repo. And user can select the one they wish.
- [x] Check why the original wp-config is changing and not the copied one.
- [x] Provide multisite support.
- [x] Provide VIP site support.
- [x] Provide memcache support.