User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Thu Jan 09, 2014 6:11 am

The original command works just fine for me.

Code: Select all

sudo cp -r ~/wordpress/* /var/www/wordpress
You had to drop the slash and replace it with a period.

Code: Select all

sudo cp -r ~/wordpress.* /var/www/wordpress
Well glad you got it worked out. Hope you can get WordPress installed now.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Guide to installing WordPress

Thu Jan 09, 2014 7:03 am

Well now we know anybody encountering such strangeness in the future will be aware of this workaround. ;)

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Guide to installing WordPress

Thu Jan 09, 2014 2:43 pm

I've made a big step forward today (I think) and went the lighttpd route, without errors, all the way to the point of editing the WP-config file.php file and making my first attempt at connecting to the Wordpress setup screen --- but --- "Error establishing a database connection" :( . It has been a long day and my brain is fried. I've tried hard to do everything correctly, but something isn't quite right. I know I'm close. Hints, please, at what I should look into first thing in the morning, and in what order. :? Thanks as usual.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Fri Jan 10, 2014 2:28 am

That is a real standard problem. Something is just a bit off. Usually a typo. If you use puTTY or other SSH you can copy and paste the lines from the tutorial then edit them for your settings. Sometimes even the pasting does not work right.

Take a break then go over your prior work with the console history. Compare that to the tutorial.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Guide to installing WordPress

Fri Jan 10, 2014 10:49 am

You must have been right Rich because I repeated the part from mysql on and now everything works! :D Now I'll just tinker with it to speed it up and maybe some other plug-ins, then start building the my site. Thanks for all your help!

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Guide to installing WordPress

Fri Jan 10, 2014 1:45 pm

Oops, don't run away yet! I nicely get into Wordpress to make some changes, and if I click 'view site', it views it. Or I should say it views 'something', because after I click save and publish then load my site, it times out trying to connect. IP-address/wordpress/ brings up my dashboard but just typing in my domain name or IP-address nothing loads and connection attempt logs out. WP is publishing somewhere, but not where my server is looking for it. Today's drama. Help again please.

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Guide to installing WordPress

Fri Jan 10, 2014 4:16 pm

Well I finally figured out that the Wordpress dashboard has a 'general' settings area which directs where the publish goes, BUT, I may have googled into the crux of the issue at hand, and if so, this is very disconcerting. So it has to do with .htaccess not being readily able to be copied to the root directory because it is a hidden file? And having some special access protections? Check out this discussion:

http://codex.wordpress.org/Giving_WordP ... _Directory

I am thinking you know all about all this Rich, and can advise me/us what to do. Good grief, I am not trying to do anything fancy, just to have my website start up from the root where my DNS points to -- or am I missing something obvious or yet once again over-tired?

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Fri Jan 10, 2014 7:14 pm

The instructions should have left you with your WordPress at the following.

/var/www/wordpress/wordpress.

So the install puts it in a sub directory already.

That is where all of mine have ended up. .htaccess needs to be in the working directory, but I also have it in /var/www. That makes it available no matter what is looking for it.

.htaccess is not needed to run just the bare site. Some plugins need it. Also I read you had used Lighttpd. It does not use .htaccess, it has its own config file.

My wordpress address is:

Code: Select all

http://rich1.dyndns.tv/wordpress
My site address is;

Code: Select all

http://rich1.dyndns.tv
The wordpress address is different than the site address. At least if you do not want to specify wordpress after the domain.

This may solve your problem.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Guide to installing WordPress

Sat Jan 11, 2014 12:23 am

My directory pointers are correct:

WordPress URL - http://CarLoversJournal.com/wordpress
Site URL - http://CarLoversJournal.com

Something else is awry. The forums say something about some themes causing problems like this, and also 404 not found problems. I have disabled all plugins. Problem remains.

I'm about ready to pitch WordPress, way too much grief and aggravation.

Edit: added this

.. but I won't, Not in my nature to give up, but seems some of us are always just one step away from the next problem. I guess that is sometimes the way life is with open source.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Sat Jan 11, 2014 6:54 pm

It took me 3 installs to get it working the first time. Now I can install it and have it work almost every time. That "Almost" is the most irritating thing about it!

Most of the time it is a ownership issue. Linux has its problems. My problem is its permissions setup. Permissions and ownership!

I have followed the tutorial step by step and I end up with a working WordPress install each time.
Did you install anything else before you followed the tutorial?
Did you make sure you updated and upgraded?

You might try rpi-update and get the newest kernel and see if that helps.

Have you seen any problems with your SD card?

Richard
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Sat Jan 11, 2014 9:26 pm

I ran the tutorial through a line by line install found a couple of mistakes and found where a couple of edits may make it easier for people to be successful. This was with 201-9-25 Raspbian full install. The newer 2014-1-7 would be faster as it needs less time to update.

Code: Select all

PNY 8GB class 4
2013-09-25-wheezy-raspbian.img (10 minutes to burn)
raspbian setup (5 minutes)
reboot
over to SSH
came up in spanish
changed to English
reboot
sudo apt-get update (5 minutes)
sudo apt-get upgrade (50 minutes) moved to 3.10.25 preempt #622
sudo apt-get install apache2 (5 minutes)
sudo apt-get install mysql-server-5.5 php5 php5-mysql php5-gd (10 minutes)
reboot
wget http://wordpress.org/latest.tar.gz (1 minute)
tar -xvzf latest.tar.gz
sudo mkdir /var/www/wordpress
sudo chown -R www-data.www-data /var/www/wordpress
cd /var/www
sudo su
chown www-data *

chown www-data */*
error: no such file or directory

chown www-data */*/*
error: no such file or directory

sudo cp -r ~/wordpress/* /var/www/wordpress
cp: cannot stat `/root/wordpress/*': No such file or directory

this error was caused by the "sudo su" added exit exit to the code window. Error cured.

sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.config.bak
sudo nano /etc/apache2/apache2.conf
AddType application/x-httpd-php .html
sudo /etc/init.d/apache2 restart

sudo cp /var/www/wordpress/wp-config-sample.php /var/www/wordpress/wp-config.php
cp: target `/var/www/wordpress/wp-config.php' is not a directory
missing "-" in code window, fixed

sudo nano /var/www/wordpress/wp-config.php
edited
mysql -u root -p
CREATE DATABASE wordpress;
CREATE USER create a user name here;
SET PASSWORD FOR wordpressuser= PASSWORD('created password');
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'password';
FLUSH TABLES;
exit
sudo reboot
successful install

Notes need to change some code windows to multiples for easier use. fix errors in tutorial.
WordPress was successfully installed and entered!
fixing tutorial next

Some of these were your trouble @PorterDon!
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

LughMatic
Posts: 2
Joined: Sat Jan 11, 2014 10:12 pm

Re: Guide to installing WordPress

Sat Jan 11, 2014 10:20 pm

Hello all ,
1st time I tried to configure RasPi+Wordpress , works fine , but I a tried to change the Wordpress URL and it breaks everything (tried to fix it modifiying some files but no success at all..)

So I've tried to reinstall it again , from the scratch , clean Raspbian image , same steps , got no errors......

I've tried 5 times!! and always I get the same , when I try to enter /wordpress or wordpress/wp-admin , I can only see the corresponding PHP code for each url , instead of sample blog or admin login panel...

Any idea? I'm lost and have tried it cleanly 5 times , same result.... :cry:

Thanks in advance

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Guide to installing WordPress

Sun Jan 12, 2014 4:35 am

Excellent Rich, thanks a million. I am going to take your advice and start from scratch reinstalling everything on a fresh SD from Raspbian on up. Sound like we (you) may finally have this nut cracked, if not, let's stay with it until we do. There is simply no reason why everybody who follows your tutorial (once purified) cannot quickly have a properly installed and operating website and Wordpress. Starting from a common environment though will be essential in order to circle in on sticky wickets and remedy in the tutorial. BTW, we need to take note of version dates for key components for possible future reference.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Sun Jan 12, 2014 5:58 am

I have not tried the new Raspbian yet (1/7/14). But it should cut the install time down.

I ended up with a good install so I am redoing my web site.

This works after you have everything installed. when you try to delete the plugins or add a theme, WordPress will ask you for host name user and pass, but it will refuse to take anything you enter. This code will then run with no errors Then your FTP(WordPress has its own little ftp) will work. I need to move it down the tutorial.

Code: Select all

cd /var/www
sudo su
chown www-data *
chown www-data */*
chown www-data */*/*
exit
With the default theme I have Filebase Download Manager working now. My old theme, e-publishing, would not allow it to work. Even after fighting to change the theme back.

Learn something new every time I re-install it!
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Sun Jan 12, 2014 6:36 am

LughMatic wrote:Hello all ,
1st time I tried to configure RasPi+Wordpress , works fine , but I a tried to change the Wordpress URL and it breaks everything (tried to fix it modifiying some files but no success at all..)

So I've tried to reinstall it again , from the scratch , clean Raspbian image , same steps , got no errors......

I've tried 5 times!! and always I get the same , when I try to enter /wordpress or wordpress/wp-admin , I can only see the corresponding PHP code for each url , instead of sample blog or admin login panel...

Any idea? I'm lost and have tried it cleanly 5 times , same result.... :cry:

Thanks in advance
I do not know. I have had that happen but when I reinstall it was cured. Do you have a firewall in your router that may be causing problems? What are you changing the URL to?
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Sun Jan 12, 2014 6:40 am

@PorterDon
I tried your site and it is asking for a user name and password. I do not see your web page. So there is something there! :D
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Guide to installing WordPress

Sun Jan 12, 2014 7:39 am

In the early 2000s I was a project director for a national U.S. professional services firm, Ajilon. I was called "the cleaner" by my colleagues (evidently from Pulp Fiction) because I would be given a project which was on the rocks, clean house, get the project back on track and our client cooled down (yes, there would be bodies laying about).

Man would heads be rolling if I was assigned the WordPress.org account! 8-)

LughMatic
Posts: 2
Joined: Sat Jan 11, 2014 10:12 pm

Re: Guide to installing WordPress

Sun Jan 12, 2014 8:50 am

Lob0426 wrote: I do not know. I have had that happen but when I reinstall it was cured. Do you have a firewall in your router that may be causing problems? What are you changing the URL to?
No Firewalls... it's a plain cheap ISP provided router... :(
It's a weird issue , everything reviewed and everything is fine , I think I've to change of project and try again in a month... :)

By the way , thank you very much for your quick response , time and dedication , If I found a solution I'll post it here.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Mon Jan 13, 2014 12:49 am

PorterDon wrote:In the early 2000s I was a project director for a national U.S. professional services firm, Ajilon. I was called "the cleaner" by my colleagues (evidently from Pulp Fiction) because I would be given a project which was on the rocks, clean house, get the project back on track and our client cooled down (yes, there would be bodies laying about).

Man would heads be rolling if I was assigned the WordPress.org account! 8-)
The basic WordPress software seems to work fine. The themes seem to vary from good to bad. Too much reliance on the ability of the theme designers. The same problem with the Plugins. Must not be any real hard rules as to what a theme is not allowed to change.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

jrap
Posts: 10
Joined: Sat Jan 11, 2014 4:57 pm
Location: Holbrook, Suffolk, UK

Re: Guide to installing WordPress

Mon Jan 13, 2014 4:40 pm

Many thanks for the amazing tutorial. I am in awe at the amount of time and work that has gone into it. I followed all the steps up to creating a Wordpress site and trying to run it. I got the obligatory "Unable to establish connection"! The problem seemed to lie in the wp-config.php file. I found that my edits hadn't been saved. Your lines are:

/** The name of the database for WordPress */
define(‘DB_NAME’, ‘wordpress‘);

/** MySQL database username */
define(‘DB_USER’, ‘user name‘);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘password‘);

Once I edited these to equal the user name and password that I created in the subsequent tutorial steps, Wordpress started and I have successfully logged in. Hopefully all will be well now. Thanks again.

John.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Mon Jan 13, 2014 11:43 pm

WordPress states they have a "famous 5 minute install", So why does it take me more than an hour? :lol: :lol: :lol: :oops:

Of course that 5 minute install is for Windows, or a provider site, not Linux. I think some one has a script for the main parts but I think you still have to do the editing by hand.

I found this one only so far, but I have not tried it.
https://github.com/LikeABoss-001/Raspbe ... stallation

The biggest problem is small typo errors. They are easy to miss with so much going on. Just a couple of days ago I found a couple in this tutorial. They had a big impact on the success of an install. Hopefully they have all been found now. If you see something that is not clear, please let me know so I can try to clear it up!

Sorry I missed those errors everyone.
Richard
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

matthijz98
Posts: 1
Joined: Sun Jan 19, 2014 8:56 pm

Re: Guide to installing WordPress

Sun Jan 19, 2014 9:07 pm

I have a problem.
When I try to load. installation page
I get: "Error Establishing database connection".
I think I've done wrong. anything with mysql.
What can I do about it?

jrap
Posts: 10
Joined: Sat Jan 11, 2014 4:57 pm
Location: Holbrook, Suffolk, UK

Re: Guide to installing WordPress

Sun Jan 19, 2014 10:00 pm

See my post two above this one.

John P.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Guide to installing WordPress

Mon Jan 20, 2014 12:19 am

matthijz98 wrote:I have a problem.
When I try to load. installation page
I get: "Error Establishing database connection".
I think I've done wrong. anything with mysql.
What can I do about it?
@jrap is right.
something is not set correctly yet. Pay careful attention to spacing and punctuation. It has to be exact. Especially this line of code.

Code: Select all

GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'password';
Make sure you change wordpressuser to the user name you set, it is case sensitive. And change the password and make sure you did not delete any of the ' characters by accident when editing. I use SSH and I copy (the line from either the tutorial or my web site) and paste (right click in the PuTTY window) the line in, then edit the user name and password before hitting enter.
This line causes most of my problems when setting up WordPress!
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

jrap
Posts: 10
Joined: Sat Jan 11, 2014 4:57 pm
Location: Holbrook, Suffolk, UK

Making WordPress 3.8.1 update work, adding images and plugin

Sun Jan 26, 2014 12:41 am

After wrestling with the 3.8.1 update to Wordpress, with adding images to the Wordpress library and deleting/installing plug-ins, I finally seem to have cracked the problems. They all seemed to involve permissions to directores and/or files.

1. Richard (Lob0426) wrote:

"This works after you have everything installed. when you try to delete the plugins or add a theme, WordPress will ask you for host name user and pass, but it will refuse to take anything you enter. This code will then run with no errors Then your FTP(WordPress has its own little ftp) will work. I need to move it down the tutorial.

cd /var/www
sudo su
chown www-data *
chown www-data */*
chown www-data */*/*
exit

"

This worked for me, especially after I added a couple more lines, going deeper into the file structure, like:

chown www-data */*/*/*
chown www-data */*/*/*/*

Looking at files and directories in File Manager and using the permissions tab helped a lot by showing the current state of permissions.

2. Whenever I tried to add an image to my library, I got various messages about being unable to create directories or add files etc. The change below helped, I think. I believe it means you can bypass the inscrutable screen that asks for domain names and passwords, etc.

In wp-config.php, add in the filesystem method:

define(‘FS_METHOD’, ‘direct’ );

3. Plugins wouldn't delete or install. Same sort of messages as in 2. Now they do.

Something in the above steps has made a difference, as Wordpress is behaving a lot better now. On to the next problem...

John.

Return to “Networking and servers”