05-20-2021, 05:10 AM
deanhills Wrote:Only hickup I got right at the beginning, and maybe you want to edit this is to make nginx lower case. When I copied the first command for installing it with the uppercase N, it came up with a "not found".
Fixed. I use Grammarly from time to time. Had it on while making this guide. It kept replacing nginx with Nginx in a lot of cases over and over. I uninstalled it towards the end as it started to replace even more words in commands with their uppercase versions. Looks like after removing Grammarly I forgot to fix the uppercase Nginx to nginx.
deanhills Wrote:Then next hickup was at the point where I had to provide WP with the database, user and password. It couldn't find the database. I suspect it had to do with the difference in commands. I had quite a lot of practice in creating MariaDB databases over the last few days, so followed my own commands. So when I used the command below and it came up with an error I ignored it.
The first command you posted is not from my tutorial. Where did you get that from? Using the MySQL commands I provided it worked flawless. No errors or issues.
Glad it worked for you in the end.
deanhills Wrote:I'm not planning to make a php change for now as I realize it may break the WP installation, however if in future I'd like to use a lower version of php like 7.3 - would it be possible with the installation command to just replace all instances of 8.0 with 7.3? Which of the lower versions is the more stable version to use? 7.3 or 7.4? I won't be doing it immediately, as the blog I imported works perfectly with php 8.0. This is just for future reference.
In that case you can skip the addition of the 3rd party repository for PHP 8.0.
At the step where we install PHP 8.0 in this guide you would install PHP 7.3 (ships with Debian 10 by default). Just replace "php8.0" in the packages with "php7.3". You might want to see with all packages are available that you need. In some cases they might have different names.
You can find all available PHP 7.3 packages via apt-get cache search function:
Code: (Select All)
apt-get update
apt-get cache search php7.3
It will most likely output a big list with everything that contains the string "php7.3". You of course want to look for packages just starting with php7.3 and packages with php7.3- (that would be the PHP extensions like php7.3-fpm for example or php7.3-xml).
Here is a small rundown from the Debian "Buster" 10 PHP package database:
Code: (Select All)
php7.3
php7.3-bcmath
php7.3-bz2
php7.3-cgi
php7.3-cli
php7.3-common
php7.3-curl
php7.3-dba
php7.3-dev
php7.3-enchant
php7.3-fpm
php7.3-gd
php7.3-gmp
php7.3-imap
php7.3-interbase
php7.3-intl
php7.3-json
php7.3-ldap
php7.3-mbstring
php7.3-mysql
php7.3-odbc
php7.3-opcache
php7.3-pgsql
php7.3-phpdbg
php7.3-pspell
php7.3-readline
php7.3-recode
php7.3-snmp
php7.3-soap
php7.3-sqlite3
php7.3-sybase
php7.3-tidy
php7.3-xml
php7.3-xmlrpc
php7.3-xsl
php7.3-zip
At parts of the tutorial where we fixed something in PHP or PHP-FPM the path to the files would be /etc/php/7.3/xxx (xxx standing for the subfolders like fpm).
So you would need to adjust commands where the path is /etc/php/8.0:
This
Code: (Select All)
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php/8.0/fpm/php.ini
Code: (Select All)
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php/7.3/fpm/php.ini
I guess you get what I mean.
And the vHost for the main site would need a small change, too.
Replace:
Code: (Select All)
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
With:
Code: (Select All)
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
I think so at least. To verify that it is really so you have to look at /etc/php/7.3/fpm/pool.d/www.conf and see what it says at the listen socket path and file name. I think it is /run/php/php7.3-fpm.sock.
That's about it. The basic rundown. You leave PHP 8.0 away and install PHP 7.3. You fix things that we fixed in PHP 8.0 in PHP 7.3. And you change a bit of code for PHP processing in the Nginx vHost file.
mzltest Wrote:The changes should be minor(if no gcc installation is required)
No gcc or other development tools required. You don't have to compile a single bit of code or package. Hence why we're using extra 3rd party repositories that provide us with the newest packages already precompiled for the Linux distribution we use.
@tbelldesignco
Great! Thank you for the feedback.
![[Image: zHHqO5Q.png]](https://i.imgur.com/zHHqO5Q.png)