jsemon
Posts: 64
Joined: Sat Mar 04, 2017 7:17 pm

Build a Lamp server with Wordpress troubleshooting

Mon Jul 03, 2017 6:39 am

I have successfully moved the wp-config.php into the appropriate folder with a successful edit. Initial problem solved. Now, when I go to the server URL for the Wordpress configuration on the "Build a LAMP Server with Wordpress" wforksheet I receive the message "Error establishing a database connection." Can someone help me sort this out and establish my operational server please. Thank you.

User avatar
DougieLawson
Posts: 39787
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Build a Lamp server with Wordpress troubleshooting

Mon Jul 03, 2017 10:11 pm

Take a look at /var/www/html/wp-config.php it should look like this (in the middle where the important bits are held)

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', 'WordPressMySQLPassword'); // this will be different - use the password you created when MySQL was installed.

/** MySQL hostname */
define('DB_HOST', 'localhost');
If it doesn't then try this:
sudo -i
cd /var/www
chown -R www-data.www.data html
rm /var/www/html/wp-config.php
exit

Run through the WP installation stuff again.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

jsemon
Posts: 64
Joined: Sat Mar 04, 2017 7:17 pm

Re: Build a Lamp server with Wordpress troubleshooting

Fri Jul 14, 2017 11:30 pm

I went through the code and my file is correct. When I go through the WP stuff I get to http://YOUR-IP-ADDRESS/wp-admin before the "Friendly permalinks" section and receive a Can't select database. The username and password work but it is not able to select the Wordpress database.

I also noticed my wp-config.php is not in the wp-content folder. Is that a problem? Why does the system deny my attempt to drag and drop the wp-config.php into wp-content folder?

I am wondering if it is a simple matter of placing a file in the correct folder to solve the problem with the server discconect. Any thoughts pertaining to this post?

User avatar
DougieLawson
Posts: 39787
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Build a Lamp server with Wordpress troubleshooting

Mon Jul 17, 2017 8:24 pm

You can't move files that your userid/group doesn't own to directories that your userid/group doesn't own. Open an LXterminal window and use sudo pcmanfm to get a root file manager (BEWARE YOU CAN 100% TOTALLY KILL YOUR SYSTEM STONE DEAD WITH THAT).

With WP everything is relative to where you drop the installation package. The wp-config.php needs to be in the "WP root" directory (whether that is /var/www/html or some sub-directory below that is your choice).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

jsemon
Posts: 64
Joined: Sat Mar 04, 2017 7:17 pm

Re: Build a Lamp server with Wordpress troubleshooting

Sat Jul 22, 2017 7:56 am

Is not knowing how to responsibly manage a file system a reason why you can kill your system? I understand how to responsibly use Mac, Chrome and PC. I understand that I should only use directions on manipulating a file system only from a valid source. I understand that the file manager has root authority over the file system. Will this basically allow me to drag and drop files anywhere and manipulate files anywhere?

If anyone can give me a heads up if this is the correct precaution before utilizing root in this scenario I would appreciate it kindly.

jsemon
Posts: 64
Joined: Sat Mar 04, 2017 7:17 pm

Re: Build a Lamp server with Wordpress troubleshooting

Sun Jul 30, 2017 2:44 pm

Anybody have a remark about the previous entry I made in this discussion. I want to make sure I understand the appropriate procedure before I proceed to utilize root.

User avatar
DougieLawson
Posts: 39787
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Build a Lamp server with Wordpress troubleshooting

Sun Jul 30, 2017 3:54 pm

If you run anything as root you can destroy your filesystem, just be careful.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

jsemon
Posts: 64
Joined: Sat Mar 04, 2017 7:17 pm

Re: Build a Lamp server with Wordpress troubleshooting

Thu Aug 03, 2017 11:42 am

What is a LXterminal? Is that the same as a MATE terminal? I tried using the sudo command you provided in the Mate terminal and it did not work. Thank you for your help. Have a great weekend!!
.

jsemon
Posts: 64
Joined: Sat Mar 04, 2017 7:17 pm

Re: Build a Lamp server with Wordpress troubleshooting

Thu Aug 10, 2017 5:21 am

I am running Ubuntu as the operating system. Is here a LXterminal in that software. I can head to the Unbuntu forums for assistance as well

User avatar
r3d4
Posts: 983
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Build a Lamp server with Wordpress troubleshooting

Thu Aug 10, 2017 7:34 am

Any ' terminal emulator' should work LX is the default on raspbian .
see also: documentation > usage > terminal @ raspberrypi.org/documentation/usage/terminal

jsemon
Posts: 64
Joined: Sat Mar 04, 2017 7:17 pm

Re: Build a Lamp server with Wordpress troubleshooting

Sat Aug 12, 2017 9:29 am

Great!! Thank you everyone. I have access to my Wordpress Server for my website. Have a great weekend everyone.

User avatar
Trigo
Posts: 106
Joined: Fri Jun 17, 2016 7:52 pm

Re: Build a Lamp server with Wordpress troubleshooting

Sun Aug 20, 2017 12:20 pm

I had a wordpress website, it was working.... Now when i try to access it, it doesn't show a thing! I've made a scan on it, returns the same Static IP but returns also a loopback error ( couldn't start l0)! I've connected it to a TV and it doesn't boot, it shows the rainbow then the four fruits and nothing more! Is there a way of getting it back to work without format the SD card?
Beat psychologically with a stick :?:

User avatar
r3d4
Posts: 983
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Build a Lamp server with Wordpress troubleshooting

Sun Aug 20, 2017 12:22 pm

Trigo wrote:
Sun Aug 20, 2017 12:20 pm
I had a wordpress website, it was working.... Now when i try to access it, it doesn't show a thing! I've made a scan on it, returns the same Static IP but returns also a loopback error ( couldn't start l0)! I've connected it to a TV and it doesn't boot, it shows the rainbow then the four fruits and nothing more! Is there a way of getting it back to work without format the SD card?
Probably ...
Step one back up 'the SD card'.

User avatar
Trigo
Posts: 106
Joined: Fri Jun 17, 2016 7:52 pm

Re: Build a Lamp server with Wordpress troubleshooting

Sun Aug 20, 2017 12:39 pm

i'm on it! i don't want to make the thing all over again! i can see a file called Boot and CMDline, can i edit something there and make it to boot?
Beat psychologically with a stick :?:

Return to “Networking and servers”