WordPress
WordPress is a web content management system. It was originally created as a tool to publish blogs but has evolved to support publishing other web content, including more traditional websites, mailing lists and Internet forum, media galleries, membership sites, learning management systems and online stores.
Ngins (Open Resty)
OpenResty® is a full-fledged web platform that integrates our enhanced version of the Nginx core, our enhanced version of LuaJIT, many carefully written Lua libraries, lots of high quality 3rd-party Nginx modules, and most of their external dependencies. It is designed to help developers easily build scalable web applications, web services, and dynamic web gateways.
File Structure
The file structure is important to know which files to modify and which ones to not. Some are auto generated and auto modified (as we modify the settings in the admin GUI dashboard. Some are done manually [Only a very few things, that too very rarely])
https://www.wpbeginner.com/beginners-guide/beginners-guide-to-wordpress-file-and-directory-structure/
The above link talks about some basic file structure.
Working

Installing
The installation can be done by 2 methods
- Manually unpacking files (from tar)
- Using WP-CLI (Almost Automated)
Manual Installation
Manual installation implies creating a repository, then downloading the package(tar) from wordpress and then unpacking it in a repository and then setting up the configs and database that is needed.
https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-18-04
More about the manual method above.
WP-CLI
WP-CLI basically stands for WordPress CLI and can be used to automate some task like creating db, site root directory, installation , configuration etc. This makes it easier to install WordPress on any machine at ease.
https://make.wordpress.org/cli/handbook/guides/installing/#recommended-installation
https://make.wordpress.org/cli/handbook/guides/quick-start/#practical-examples
Steps to follow for automatic(wp-cli) method is above
Nginx Config
Both of these needs nginx configs setup manually only (Can be automated)
...
http {
include mime.types;
default_type application/octet-stream;
server {
...
root /var/www/wordpress/wordpress.example.com;
index index.php index.html;
...
location / {
index index.php index.html;
try_files $uri $uri/ /index.php$is_args$args;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /var/www/wordpress/wordpress.example.com;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
location ~ /\.ht {
deny all;
}
...
This is a basic config that needs to be done in order to have a fully working wordpress instalaltion.
Possible Issues
You can face issues in CSS breaking in the site if nginx is not configured properly or if ssl is not configured properly.
Php Dependencies