P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 4:00 pm

RPi Zero W - Followed Wordpress installation ~ Not working.

Image

Help always appreciated.
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 5:56 pm

Points to possible password / user issue, database not starting, database not able to be reached (if on another machine) or database not installed...

More clues neded :lol:

Try

Code: Select all

mysqladmin -u root -p status

P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 6:06 pm

Andyroo wrote:
Fri Aug 23, 2019 5:56 pm
Points to possible password / user issue, database not starting, database not able to be reached (if on another machine) or database not installed...

More clues neded :lol:

Try

Code: Select all

sudo mysqladmin -u root -p status

Uptime: 16943 Threads: 1 Questions: 88 Slow queries: 0 Opens: 15 Flush tabl es: 1 Open tables: 78 Queries per second avg: 0.005

thanks
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 6:15 pm

So you are running (good start).

There is a wp config program (php) - something like WP-config.php and it should have

Code: Select all

define('DB_NAME', 'database-name');
define('DB_USER', 'database-username');
define('DB_PASSWORD', 'database-password');
define('DB_HOST', 'localhost');
Do you have that?

If so:
1) Check the database exists in the database (show databases)
2) Check the user / password match those in the database (reset password is simplest)
3) Check the user above has access to the database (show grants)
4) Is the database on the same machine as the WordPress install?

Shout if you do not know how to do any of the above...

P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 6:48 pm

Andyroo wrote:
Fri Aug 23, 2019 6:15 pm
So you are running (good start).

There is a wp config program (php) - something like WP-config.php and it should have

Code: Select all

define('DB_NAME', 'database-name');
define('DB_USER', 'database-username');
define('DB_PASSWORD', 'database-password');
define('DB_HOST', 'localhost');
Do you have that?

If so:
1) Check the database exists in the database (show databases)
2) Check the user / password match those in the database (reset password is simplest)
3) Check the user above has access to the database (show grants)
4) Is the database on the same machine as the WordPress install?

Shout if you do not know how to do any of the above...

This is my data in wp-config.php

Code: Select all

[color=#00BF00]// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', '*********' );

/** MySQL database username */
define( 'DB_USER', '****' );

/** MySQL database password */
define( 'DB_PASSWORD', '****************' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );[/color]
Then: Database:

Code: Select all

[color=#00BF00][email protected]:/var/www/html $ sudo apt update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
[email protected]:/var/www/html $ ls
index.php        wp-blog-header.php    wp-cron.php        wp-mail.php
license.txt      wp-comments-post.php  wp-includes        wp-settings.php
readme.html      wp-config.php         wp-links-opml.php  wp-signup.php
wp-activate.php  wp-config-sample.php  wp-load.php        wp-trackback.php
wp-admin         wp-content            wp-login.php       xmlrpc.php
[email protected]:/var/www/html $[/color]
Then:
3) Check the user above has access to the database (show grants) HOW?
4) Yes

Could the problem be to do with the user?
How do I check the user as I have it in "root".
Thanks
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 7:11 pm

Best thing is to create a WordPress user that has limited abilities within the databases unlike root who can do everything.

Not sure how much of this you may have done but the steps I would do are (Signed into sql as root):

1) Create the database for WordPress

Code: Select all

CREATE DATABASE wpdata;
2) Create a user just for WordPress - replace xxx with your password

Code: Select all

CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'xxx';
3) Set security up for the user and data

Code: Select all

GRANT ALL ON wpdata.* TO 'wpuser'@'localhost';
It’s not safe to use root as the user - anyone who can hack WP will have full access to every database on the system :cry:

P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 7:15 pm

When I got to this stage:
Image
I think I may have made a booboo with the username.
How to check and change in both server and database.

Thanks
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 7:17 pm

Not the first one to do that :lol:

Simplest way is as root in the database issue

Code: Select all

select user, password from mysql.user;

User avatar
DougieLawson
Posts: 36308
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 7:18 pm

Don't use root for a WP database, that's insecure (and WP is well known to be full of security holes).

Create a new and unique MySQL userid with just the limited privileges it needs to run WP (do not use GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';).

https://www.digitalocean.com/community/ ... s-in-mysql
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 7:23 pm

Andyroo wrote:
Fri Aug 23, 2019 7:11 pm
Best thing is to create a WordPress user that has limited abilities within the databases unlike root who can do everything.
It’s not safe to use root as the user - anyone who can hack WP will have full access to every database on the system :cry:
"CREATE DATABASE wpdata;"...

In other words:

create a file wpdata
or folder wpdata

is this to be created within the database below:




index.php wp-blog-header.php wp-cron.php wp-mail.php
license.txt wp-comments-post.php wp-includes wp-settings.php
readme.html wp-config.php wp-links-opml.php wp-signup.php
wp-activate.php wp-config-sample.php wp-load.php wp-trackback.php
wp-admin wp-content wp-login.php xmlrpc.php
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 7:26 pm

DougieLawson wrote:
Fri Aug 23, 2019 7:18 pm
Don't use root for a WP database, that's insecure (and WP is well known to be full of security holes).
...
All my spam on Wednesday this week (20+ mails) led back to hacked WP sites - some a couple of versions out of date :o

It’s better than it was but still a long way to go...

P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 7:29 pm

Andyroo wrote:
Fri Aug 23, 2019 7:26 pm
DougieLawson wrote:
Fri Aug 23, 2019 7:18 pm
Don't use root for a WP database, that's insecure (and WP is well known to be full of security holes).
...
All my spam on Wednesday this week (20+ mails) led back to hacked WP sites - some a couple of versions out of date :o

It’s better than it was but still a long way to go...
Ouch!
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 7:30 pm

P.Pea wrote:
Fri Aug 23, 2019 7:23 pm
Andyroo wrote:
Fri Aug 23, 2019 7:11 pm
Best thing is to create a WordPress user that has limited abilities within the databases unlike root who can do everything.
It’s not safe to use root as the user - anyone who can hack WP will have full access to every database on the system :cry:
"CREATE DATABASE wpdata;"...

In other words:

create a file wpdata
or folder wpdata

is this to be created within the database below:



index.php wp-blog-header.php wp-cron.php wp-mail.php
license.txt wp-comments-post.php wp-includes wp-settings.php
readme.html wp-config.php wp-links-opml.php wp-signup.php
wp-activate.php wp-config-sample.php wp-load.php wp-trackback.php
wp-admin wp-content wp-login.php xmlrpc.php
Neither, this is done in the SQL database.

You need to sign into that using

Code: Select all

mysql -u root -p
Have you been following any instructions or trying to piece this together from odd posts?

If you are new to both web servers and WordPress you may do better to look at x10hosting to get started while you read up about setting a secure server up...

P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 7:36 pm

Okay, I've checked users password:
I've checked User
I've checked all other details.
All I can remember is that when I set the username for The wordpress setup... Not the database... the setup {Actual loging in to database}, I used root...I think this is what's wrong but I don't know how to change it.
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 7:44 pm

If you are not going to put the server on the Internet I think it would be best to post some of the info here so we can check it as it’s a bit hard to guess from the error / description.

Remember, once you understand how it all links together you can start a new database or even a new SD card so anything here is invalid :D

If you are happy to do this can you:
Start sql and post the output of:

Code: Select all

show databases;
select user, password from mysql.user;
Then from the command line the contents of wp-config.php without the data being redacted.

We can then check everything links up and see if we need to run anymore commands.

P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 9:07 pm

Unable to access
password from mysql.user
or
password from mysql.pi
via
select pi

maybe i'm confused?
I got this though...

Code: Select all


[email protected]:/var/www/html $ mysql -u pi -p
Enter password:
ERROR 1698 (28000): Access denied for user 'pi'@'localhost'
[email protected]:/var/www/html $ mysql -u pi -p
Enter password:
ERROR 1698 (28000): Access denied for user 'pi'@'localhost'
[email protected]:/var/www/html $
Then

Code: Select all


<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );

/** MySQL database username */
define( 'DB_USER', 'pi' );

/** MySQL database password */
define( 'DB_PASSWORD', '(123abc' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define( 'AUTH_KEY',         'C5*I|ci^0cB?SN~ PUg-}/A1.RsQK.oW;<H|#-Q#+~8g-{VCJqqOK;p5DRu|mrKM');
define( 'SECURE_AUTH_KEY',  '?YMX5[|>(Z&_ql |,-O,->7T9AKm.Z+6}${}(| d%,(]^8C4ipUKC_[(X,bzn~|E');
define( 'LOGGED_IN_KEY',    'WizyZ&7X-o4{S%kgFN_4b6p|| `Yg<#Q^[email protected]([email protected]=Gr-qu&[!iGju7z7QN&}1j~Y');
define( 'NONCE_KEY',        'GaGT>?IaX-!H,s|f$xz9JnS=VpC(>j3X9sy(WNCPL>H0[|MOURv;efW6xaeOZ6rU');
define( 'AUTH_SALT',        '_$$3m[TGUPx:5VOnTBt3M3[0N}l2RVy#dm6`1?,E#VX!Sr0t<>iw/izc&X-tXhV{');
define( 'SECURE_AUTH_SALT', 'HP|!50;[email protected]!$+P7!qxIF587{1#m)#5f;[Q `F1%+MF}iLCa$>nHNEiv-^9,u');
define( 'LOGGED_IN_SALT',   'e8!N4sqTBV3hRl.&hdL6BQ+hSaI7?}#$zm}SRHK9T`mV,@e_Z9>lFe2=-s<b|%dW');
define( 'NONCE_SALT',       ')6+l9*#%EGC4H+}->IG<]=4~nm~&Wf?fZzq|[email protected]__P;4.-V<H{|KQ A5$T^H!d');
/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix = 'wp_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define( 'WP_DEBUG', false );

/* That's all, stop editing! Happy publishing. */

/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
        define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}

/** Sets up WordPress vars and included files. */
require_once( ABSPATH . 'wp-settings.php' );
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

User avatar
DougieLawson
Posts: 36308
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 9:09 pm

On Stretch and Buster the root user doesn't need a password. You can start a root bash shell (sudo -s) and use mysql to get a root MySQL shell.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 9:13 pm

You need to use the database account / user called ‘root’ for MySQL not Pi...

Do not mix these up with the computer users as these accounts are totally separate from the computer Ones and stored internally within a system database in MySQL.

Part of your set up should have included the creation of the database account / user... do you have a link to the instructions you followed.

P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 9:18 pm

Andyroo wrote:
Fri Aug 23, 2019 9:13 pm
Part of your set up should have included the creation of the database account / user... do you have a link to the instructions you followed.
Changed:

Code: Select all

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );

/** MySQL database username */
define( 'DB_USER', 'root' );

/** MySQL database password */
define( 'DB_PASSWORD', '(123abc' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
https://projects.raspberrypi.org/en/pro ... ordpress/4
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

User avatar
DougieLawson
Posts: 36308
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 9:30 pm

The instructions at https://projects.raspberrypi.org/en/pro ... ordpress/7 are going to work (from a get WP running basis) but are not promoting good security practices. If I could be bothered I'd re-write them on github and do a pull request (but I have no interest in running WP on any of my Raspberries as I'm not a blogger (I've tried WP, but it just doesn't work for me, in the same way that Wikis don't work for me)).

You really should create a brand new userid for "WP" with just insert/select/update/delete on a "WP.*" database (once it's been created). If I were doing that I'd install phpmyadmin to do it (although phpmyadmin is also a PHP based security nightmare with almost as many holes as the WP security nightmare).

Do NOT use pi or root (even if you thought you could - it's too insecure). You can change "WP" to any string you like.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 9:45 pm

I would run the commands I provided here and change the define lines to read:

Code: Select all

define( 'DB_NAME', 'wpdata' );

/** MySQL database username */
define( 'DB_USER', 'wpuser' );

/** MySQL database password */
define( 'DB_PASSWORD', 'what you used on the create user xxx' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );
This will link WP to the database a little more securely than the basic instructions.

P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 10:06 pm

Andyroo wrote:
Fri Aug 23, 2019 9:45 pm
I would run the commands I provided here and change the define lines to read:

Code: Select all

define( 'DB_NAME', 'wpdata' );

/** MySQL database username */
define( 'DB_USER', 'wpuser' );

/** MySQL database password */
define( 'DB_PASSWORD', 'what you used on the create user xxx' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );
This will link WP to the database a little more securely than the basic instructions.
Tried and failed for tonite I shall get some zz's and then install a fresh copy tomorrow...
Appreciate your help so far...
I'll do a completely different user and write down all the details for the attempt.
Thanks Andyroo
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Fri Aug 23, 2019 10:14 pm

Sometimes a wise move is a nights break.

I should be on at some point - just drop a post here and it will email me if you get stuck.

One question - are you running Buster or Stretch on the Zero W?

I have a spare (till Tuesday at least) that I can format up if needed.

P.Pea
Posts: 20
Joined: Sat Apr 15, 2017 11:43 am

Re: Zero W - Followed Wordpress installation ~ Not working.

Sat Aug 24, 2019 7:34 am

Andyroo wrote:
Fri Aug 23, 2019 10:14 pm
Sometimes a wise move is a nights break.

I should be on at some point - just drop a post here and it will email me if you get stuck.

One question - are you running Buster or Stretch on the Zero W?

I have a spare (till Tuesday at least) that I can format up if needed.
Buster.

This the code on my php without keys:
*Saved as wp-config.php*

Code: Select all

<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wpdata' );

/** MySQL database username */
define( 'DB_USER', 'muppet' );

/** MySQL database password */
define( 'DB_PASSWORD', 'YadaYadaYada' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordP$
 * You can change these at any point in time to invalidate all existing cookies. This will forc$
 *
 * @since 2.6.0
 */
define( 'AUTH_KEY',         'put your unique phrase here' );
define( 'SECURE_AUTH_KEY',  'put your unique phrase here' );
define( 'LOGGED_IN_KEY',    'put your unique phrase here' );
define( 'NONCE_KEY',        'put your unique phrase here' );
define( 'AUTH_SALT',        'put your unique phrase here' );
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
define( 'LOGGED_IN_SALT',   'put your unique phrase here' );
define( 'NONCE_SALT',       'put your unique phrase here' );

/**#@-*/
Matched to wordpress front page access at the beginning of connection.

This is my whole process so far:

Code: Select all

#The process of installing Raspian:

#The process of installing ufw gufw (To check everything is working)
sudo apt-get install ufw gufw
#(SSH)
sudo ufw allow 22
#(Shell)
sudo ufw allow 80
#(Encryption)
sudo ufw allow 443
#(avahi-daemon) (Apple)
sudo ufw allow 5353
#(Enable UFW)
sudo ufw allow ssh
sudo ufw default deny
sudo ufw enable
#sudo ufw disable

#Check Status
sudo ufw status verbose

#(MyMediaAlexa) (My Extras)
sudo ufw allow 52050
sudo ufw allow 52051


#Now the process of installing Wordpress via https://projects.raspberrypi.org/en/projects/lamp-web-server-with-wordpress
#1st The process of installing apache
sudo apt-get install apache2 -y
# Test the web server via: http://localhost or RPi's local ip address

#2nd The process of installing php
sudo apt-get install php -y
# To access these files we need to access cd /var/www/html/ folders
cd /var/www/html/

#(Testing)
#If using RPi GUI use leafpad if not use nano
#sudo leafpad index.php
sudo nano index.php

#Insert this and save:
#<?php echo "hello world"; ?>
#if needed
#sudo service apache2 restart 
#Then remove old html:
sudo rm index.html


#3rd The process of installing MySQL:
sudo apt install mariadb-server php-mysql -y
#Then:
sudo service apache2 restart


#4th The process of installing wordpress:
# access /var/www/html/
cd /var/www/html/
sudo rm*
#wget:
sudo wget http://wordpress.org/latest.tar.gz
#unwrap
sudo tar xzf latest.tar.gz
#Move
sudo mv wordpress/* .
#Remove old tarball
sudo rm -rf wordpress latest.tar.gz
#Change ownership to apache user
sudo chown -R www-data: .

#5th The process of installing wordpress database:
sudo mysql_secure_installation

#You will be asked Enter current password for root (enter for none): — press Enter.

#Type in Y and press Enter to Set root password?.

#Type in a password at the New password: prompt, and press Enter. Important: remember this root password, as you will need it later to set up WordPress.

#Type in Y to Remove anonymous users.

Type in Y to Disallow root login remotely.

#Type in Y to Remove test database and access to it.

#Type in Y to Reload privilege tables now.

#When complete, you will see the message All done! and Thanks for using MariaDB!.

#Create the WordPress database:
sudo mysql -uroot -p

#Insert these:
create database wordpress;
#If this cdhas been successful, you should see this:

#Query OK, 1 row affected (0.00 sec)

#Now grant database privileges to the root user. Note: you will need to enter your own password after IDENTIFIED BY.

GRANT ALL PRIVILEGES ON wordpress.* TO 'root'@'localhost' IDENTIFIED BY 'YOURPASSWORD';

#For the changes to take effect, you will need to flush the database privileges:
FLUSH PRIVILEGES;

#Now exit:
exit

#or Exit the MariaDB prompt with Ctrl + D.

#Now reastart service
sudo service apache2 restart

#Wordpress is now installed and you can proceed to your webpage 

*******************************************************************

#The next stage requires editing of the wp-config-sample.php to be later saved as wp-config.php. Make sure you are in /var/www/html/ so:
cd /var/www/html/
sudo nano wp-confi-sample.php

This the code on my php without keys: 
*Saved as wp-config.php*

*** and then continuing to finish...***
I still get this:

Image
sadly...
I'm a noob with learning difficulties so don't be so vague!
Better explanations yield results and I understand better which in turn saves you time and the rest that follow.

Andyroo

Re: Zero W - Followed Wordpress installation ~ Not working.

Sat Aug 24, 2019 5:38 pm

A quick read though shows two bits with the firewall settings

1) You have not limited the scope of access - any device on any network can access the port so if your router is breached external folk can get on. You may want to consider only allowing SSH etc from one internal LAN IP address and setting your main machine to have that address

2) You do not have a port open for SQL - 3306 is the standard port unless you have changed the config file / start up at all.

Return to “Troubleshooting”