Trying to get wordpress.org spun up on a website of mine, but running into trouble.

[ad_1]

Hey all!

As the title says, I’m having trouble getting wordpress.org on a sub-directory of my website.

I’m running a LEMP stack, Linux (ubuntu), Nginx, Mysql, PHP.

Here’s the steps I’ve taken so far:

1. Installed the latest version of WordPress from the Ubuntu package repositories, along with the the requirements, such as PHP and it’s extensions, and mysql-server. I believe the versions I’ve got all work together.

2. I downloaded wordpress into my home directory, and I cp’d the wordpress files into a sub-directory of my website’s root directory. I’m using `/var/www/html/<myWebsite>/blog` as the root of my wordpress installation.

3. I made a mysql database, and a user with the proper permissions.

4. I modified the `wp-config-sample.php` file to point to the database / user, and I renamed the file to `wp-config.php`.

5. I used `sudo chmod -R 775 ./wp-content` and `sudo chown -R www-data:www-data ./wp-content`

6. I setup my Nginx server block to look like the following:

(I’m playing around with fastCGI and C, which is what the `/api` location block is, and I’ve got Certbot running for free SSL.

server {
server_name kingsberrypowercanada.ca www.kingsberrypowercanada.ca;
root /var/www/html/kingsberrypowercanada.ca;
index index.html index.php index.htm;

location /api {
fastcgi_pass localhost:2023;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/scripts/test; #override t
}

location /blog {
alias /var/www/html/kingsberrypowercanada.ca/blog;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/kingsberrypowercanada.ca/fullchain.pem; #
ssl_certificate_key /etc/letsencrypt/live/kingsberrypowercanada.ca/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

6. I went through the first “world famous 5-minute install” by reloading my Nginx daemon, and going to `<myWebsite>/blog/wp-admin/install.php`. It was also strange because the CSS of the install page wasn’t loading.

8. I used WP-CLI to install and activate a theme, Elementor-Hello.

9. Now, when I try to go to `<myWebsite>/blog`, I get a 404 error.

I’ve been scratching my head about this for two days now, any help would be so appreciated! Thank you!

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer