User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Turn-key WordPress Server Image - PressPi

Wed Jan 14, 2015 7:48 pm

Lob0426 wrote:Your existing pages will be in the /usr/share/nginx/www folder. The WordPress Posts and Pages are stored in the MySQL database. How do you propose to link them into one site?
It's possible, but the rewrite rules would be a mess.
WordPress uses PHP not HTML.
Wordpress uses PHP to generate html. To be clear, everything you read on the page you are currently looking at is html. It is the language of your web browser. However you generate it, it is generated. This is why WP can be ungodly slow. It takes time to run php to read a database for all sorts of data that it jams together, using a theme, to generate the pretty html pages.
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

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

Re: Turn-key WordPress Server Image - PressPi

Wed Jan 14, 2015 8:41 pm

iinnovations wrote:
Lob0426 wrote:WordPress is just as fast, if configured properly, at serving your site.
This is, quite simply, silly, especially if you are using nginx.

C
When your upload is only 100k nothing is going to make it faster, if images are part of the page.

If you want to split hairs and slave yourself to tenths of a second then your statement is true. If the ability to see the page in a decent time then you are nitpicking. NGINX is faster than Apache2 which is what I use.
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
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Turn-key WordPress Server Image - PressPi

Wed Jan 14, 2015 8:50 pm

Lob0426 wrote:
iinnovations wrote:
Lob0426 wrote:WordPress is just as fast, if configured properly, at serving your site.
This is, quite simply, silly, especially if you are using nginx.

C
When your upload is only 100k nothing is going to make it faster, if images are part of the page.

If you want to split hairs and slave yourself to tenths of a second then your statement is true. If the ability to see the page in a decent time then you are nitpicking. NGINX is faster than Apache2 which is what I use.
This is not about splitting hairs. There is a big difference. Use your google. Wordpress is a resource hog.

nginx is better at serving static content. nginx doesn't even serve php. php5-fpm is typically used (I assume that is what is being used here). In other words, you will see a bigger difference with static content, but not with php.
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

User avatar
Offcenter
Posts: 182
Joined: Wed Jul 31, 2013 4:57 pm
Location: Northwestern New Jersey USA

Re: Turn-key WordPress Server Image - PressPi

Wed Jan 14, 2015 9:29 pm

Oh boy! I'm more confused now than I ever was.

Maybe I'm not explaining it well enough.
Let me try again.
I will be making a NEW HOME PAGE with wordpress.
On this page will be links to other pages, like any other website.
Some of these links will point to my old, pre-existing HTML pages.
What directory do I put my old pages in so that the
NEW WORDPRESS HOME PAGE can find them?
I don't want my old pages edited, changed or converted. They
are fine the way they are. I just want them to become a
sub set of the new website.
George in New Jersey.
(learning a little bit every day.)
(and darned confused most of the time!)

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

Re: Turn-key WordPress Server Image - PressPi

Wed Jan 14, 2015 10:16 pm

iinnovations wrote:
Lob0426 wrote:Your existing pages will be in the /usr/share/nginx/www folder. The WordPress Posts and Pages are stored in the MySQL database. How do you propose to link them into one site?
It's possible, but the rewrite rules would be a mess.
WordPress uses PHP not HTML.
Wordpress uses PHP to generate html. To be clear, everything you read on the page you are currently looking at is html. It is the language of your web browser. However you generate it, it is generated. This is why WP can be ungodly slow. It takes time to run php to read a database for all sorts of data that it jams together, using a theme, to generate the pretty html pages.
Linking the pages: Yes it is possible, but do you have the ability to do it? I am pretty sure he doesn't, I know I don't. But I explained an easy way to get the same effect.

WordPress uses PHP not HTML:
Trying to keep the explanation simple.

The difference is not in what you are seeing. It is in what WordPress USES, it uses PHP, it is shown to the world HTML. So there was nothing incorrect about my statement. WordPress uses PHP not HTML to build ITS pages.

I transfered my pages into WordPress and had to strip away some of the formatting and code from an HTML editor. WordPress did not display it properly. In fact it was easier to copy just the text over and edit it in WordPress to add the images or code back in. WordPress likes plain text and then uses its own "code" to display images or code or URL's. So been there done that.

When you use a cache such as WP FastCache or Total cache it converts the pages to static HTML page files and serves them outside the database. This increases their serve speed. Average serve time for my pages full of pictures is about 3.5 seconds per. Part of this time is due to looping from my use of DynDns. Can it be faster? Yes. Does it need to be? No. Not for a personal site it doesn't.

He wants to have static pages and be able to use WordPress because it is easy. He can do that by using WordPress, but not in its usual way. Then the cache serves the pages as static HTML.

It is the online editor that makes WordPress easy. You can edit or create pages from anywhere on any device. Using an iPad right now. Some of my pages were created on an iPhone, some on a netbook, some on my desktop. I can even use my UBUNTU based CNC system to create Pages. An Android device, yes. That is why people don't care about slow.

I have used WordPress, and other sites, on a server (my Atom 330 server 2003(WHS)) and a Panda Board ES (UBUNTU). Serve times about 1 second per page and 1 seconds per page. I have also used online hosting. So WordPress is not unusually slow. Again not for a personal site.

If you want fast then pay for a website. You have a time critical website that needs to serve numerous connections simultaneously (concurrent) then don't use a Raspberry Pi. If you want convenient and cheap then build a site on a Raspberry Pi and host it from home. WordPress makes it easy, not fast!
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: 2156
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Turn-key WordPress Server Image - PressPi

Wed Jan 14, 2015 10:41 pm

Offcenter you put them into
/usr/share/nginx/www
Then you will create links to those pages in one of the "widgets". Not sure which as yet. Not the pages widget. A links "widget", maybe the meta widget. Or you could create the links in your first post.

This is since you clarified that you do not want to edit them with WordPress.

Then you will create "pages" in the WordPress Dashboard. Widgets are accessed under appearance in the dashboard. There you drag and drop the widgets you want into the sidebar.

You will create just one "post" that will be seen when a person first enters your site.

The pages widget is a sidebar that creates a list of your WordPress pages. This will give you basically the same thing as a home page then linked pages from there. I turn off the sidebar in my pages.

Overall you should be able to get the same effect as a standard website rather than a "blog". Picking the right theme will help also.

My web site is setup close to this, except I use the "blog" to introduce my projects to any readers. Check out my site and see if the "one post blog" might not work for what you want.
http://rich1.dyndns.tv
Last edited by Lob0426 on Thu Jan 15, 2015 12:11 am, edited 1 time in total.
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: 2156
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Turn-key WordPress Server Image - PressPi

Wed Jan 14, 2015 11:35 pm

Innovations:
Yes it is a resource hog. Uses 140MB memory on average on the RasPi. No that is not that much. It does run better if you Overclock it. It runs fine on a 256MB RasPi as long as you do not want a bunch of other stuff running too.

Yes it is slow compared to many other sites. But you have to keep it all in context. It works just fine for a personal site. How fast does it have to be to put personal stuff on it? Or to display my personal projects? It would not be my choice for a business site. Or worse yet a retail site.

There is a difference between ultimate efficiency and real world use.

Example:
You are designing a Tank. You determine that 2 cubic meters is enough space for each crew member. Or you determine 3 cubic meters is enough for them. So what is the real world difference? The difference between Russian armor or Western armor crew comfort! Crew comfort translates to efficient operation, or efficient use of space. Which piece of armor do you want to be cooped up in for the next 36 hours?

Example 2:
You are building a cabinet out of wood. The specs say 1/16" or .0625". Which is correct for a cabinet.
You are building a pillow block out of aluminum. The spec says .0625" or 1/16" which spec is correct for metal work.
To top this off what is the allowed variance from the specification. In wood it would be +\- 1/32". In metal it would be +\- .003" maybe less if specified.
The point is that there is an allowable error.

Time that is measured in seconds or tenths of a second really do not matter if the content is worth waiting for. If the content was not worth waiting for, then you would not be trying to view it in the first place. If you leave the site because it is taking 3 seconds to open then you probably were not that interested.

I waited for hours to get my Raspberry Pi orders in when they were first sold, me and 300,000 other orders.

The context? Time versus level of interest. Tenths, or seconds maybe even minutes? Depends on what your level interest is.

The WordPress convenience is worth the wait. The level of interest in the subject matter will make the difference of whether the site is worth the wait.
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: 2156
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Turn-key WordPress Server Image - PressPi

Thu Jan 15, 2015 3:27 am

cupidcontrols.com:
Iinnovations;
I went to the above site from your sig. It was very slow to load, 20 seconds or better (500k to 700k average down). My brother loaded it in a few seconds (up to 20Mb down). One reason is that you have 9 very long posts, full of pictures, in the front page display. If they would go into settings > then reading settings and set that down to 3 to 5 posts, the performance would increase. Since it appears to be a site connected to a business I would not recommend setting the front page displays to static.

Converting some of the posts to pages then using a cache would allow you to have the older content served as static pages. This is a cut and paste operation mostly. Then use the pages widget to display those pages in the left sidebar. Another strategy would be to begin with the post and use a link to continue it to a page to reduce the load in the front page.

I also went to the second site in your sig.
interfaceinnovations.org/cupidcontrols.html
Very fast. If the two sites are associated then why is one a html site and the other WordPress?

Offcenter: I forgot you could convert the front page display to static, this would be a good setting for you to make in your site. I control my site to 3 posts to improve performance. I saw the static settings while looking up how I limited the number of posts. I have not been in there in quite a while!
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
Rionoskae
Posts: 204
Joined: Thu Mar 06, 2014 5:40 pm
Location: WI
Contact: Website

Re: Turn-key WordPress Server Image - PressPi

Thu Jan 15, 2015 6:54 pm

Wow... It would seem I've been away for awhile, I missed alot!

Thanks for stepping in and providing some awesome and helpful information Lobo :) In regards to the discussion on page speed - I'll be publishing a post in the near future that details how to squeeze every ounce of performance out of Presspi ( and wordpress sites in general really ) and improve page/site load times.

@offcenter
In any event, I think Lob0426 has got it right. If I were you - I would also seriously consider importing your content into wordpress, as even if you manage to interlink your html + wordpress pages together, the theme will never match... What you would end up with is a very inconsistent experience for users who visit your page.... Just my 2 cents.

Alternatively you can just delete the contents of /usr/share/nginx/www, which would in turn mean you are just using nginx + the raspberry pi to host your website. ( as you would be deleting wordpress at that point) - But that is another way to go.

~Cheers

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

Re: Turn-key WordPress Server Image - PressPi

Thu Jan 15, 2015 9:05 pm

I think Offcenter is looking to move to the convenience of Wordpress, but wishes to preserve his old site pages. I think he could move his old site into a folder in /www then redirect from WordPress to this old site. This would have the advantage of just having to create one link, then navigating within the old site. Then his new site would be WordPress. Basically running it multi-site.

I made the decision to just manually move my old content into WordPress. I only had around a dozen pages so it was not to big of task. He may have a much bigger site that is just not going to be easy to convert.

I do not know if I have an old site to try it with. Maybe in a backup on my Windows Home Server. If I can't find one I will have to create a simple one and see if I can get it to work. It should work.
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
Offcenter
Posts: 182
Joined: Wed Jul 31, 2013 4:57 pm
Location: Northwestern New Jersey USA

Re: Turn-key WordPress Server Image - PressPi

Fri Jan 16, 2015 3:29 am

Lobo, yes, you got it right. That is what I want to do.
As far as importing and converting all my current pages goes,
I presently have at least 34 pages on my site. That would be
quite a job to convert them all I think.
But as I'm slowly beginning to understand how WP works, I'm
also beginning to think that in the end, converting them all may
be the way to go.
Oh boy! That is gonna be a big job!
Thanks guys.

P.S. I don't know if you looked at my website. Here it is:
http://unclegeorge.no-ip.org
The site is presently running on my old Pi B model, running
Lighttpd as the server. It's been running 24/7 for the last
year and half.
George in New Jersey.
(learning a little bit every day.)
(and darned confused most of the time!)

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

Re: Turn-key WordPress Server Image - PressPi

Fri Jan 16, 2015 6:10 am

I just took a look.
They would take a little time. You copy the text then create a new page. Then paste in the text. For the pictures you click the Add Media button. Then you can drag and drop all of your pictures into the media area at once. You have to put the pictures back into the right pages.

You might also try to put the whole sight into a folder in /usr/share/nginx/www. I have not tried it yet but you may be able to create a link to your "old site". Copying the whole site into /www will at least make sure that you have it all, especially the pictures, where you can get at them.

I think it took about 5 minutes to convert each page. Some took a while longer, when they had a lot of pictures in them.

You will find WordPress a lot easier to add content 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!

ShakeSpear
Posts: 80
Joined: Sat Aug 30, 2014 2:34 am

Re: Turn-key WordPress Server Image - PressPi

Sat Jan 17, 2015 8:52 pm

Currently I am using servers (6 node cluster). I am using pyplate currently and I sycn all the files in /usr/share/pyplate to all nodes via rsync, how does one do this with wordpress or whatever it is of wp.

Thanks!

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

Re: Turn-key WordPress Server Image - PressPi

Sat Jan 17, 2015 9:03 pm

@Offcenter
I was able to create a folder in /www called old-site. I could not find a widget that helped. I created a page that I put a link to

Code: Select all

old-site/index.html
That went right to that "old site". You should be able to put this into your only post also.

This should make it easier to just transfer your old site as a folder into /usr/share/nginx/www. There were no permissions issues and there should have been. I will look into that!

You can try it by going to http://rich1.dyndns.tv/?page_id=415 then click Old Site.

EDIT: I found out you can use the "text" widget to get to the "old-site". This put the link into my sidebar.

Code: Select all

<a href="old-site/index.html">Old Site</a>
Last edited by Lob0426 on Sun Jan 18, 2015 12:55 am, edited 1 time in total.
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: 2156
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Turn-key WordPress Server Image - PressPi

Sat Jan 17, 2015 10:33 pm

ShakeSpear wrote:Currently I am using servers (6 node cluster). I am using pyplate currently and I sycn all the files in /usr/share/pyplate to all nodes via rsync, how does one do this with wordpress or whatever it is of wp.

Thanks!
WordPress uses a database. I do not think you could distribute the database between your cluster. That means you will have to use one server as the database. This causes that one server to be the bottleneck. I tried running two RasPi, one as the WordPress server and the other as a Database server only. This gave very little gain in performance. 2/10ths of a second read from the database and 3/10ths write to the database.

You would have to search online to see if there is a multi-server solution for WordPress, then try to carry that onto your servers.

I did find this article on clustering WordPress. http://www.aschroder.com/2011/06/cluste ... instances/
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
Offcenter
Posts: 182
Joined: Wed Jul 31, 2013 4:57 pm
Location: Northwestern New Jersey USA

Re: Turn-key WordPress Server Image - PressPi

Wed Feb 18, 2015 10:32 pm

Just getting back to this after being distracted by life in general.

New problem:
Rionoskae, your instructions say to change your MYSQL password, and
then log into WordPresspi and change the password there.

After changing the MYSQL password, I can no longer log into
WordPressPi. When I try to access WordPressPi at
http://presspi/wp-login.php, as you instruct, all I
get is a "Database access error" over and over.
When I change the MYSQL password back to what you had it
set at, I can again log into WordPressPi with no problem.
What's up with that?
It seems that WordPressPi is somehow tied to the original
password in MYSQL.
Help!
I'd like to put in passwords of my choosing.
George in New Jersey.
(learning a little bit every day.)
(and darned confused most of the time!)

User avatar
Rionoskae
Posts: 204
Joined: Thu Mar 06, 2014 5:40 pm
Location: WI
Contact: Website

Re: Turn-key WordPress Server Image - PressPi

Thu Feb 19, 2015 11:56 am

I've tested the instructions before posting them... They should work pretty much as is. I'll have to image this up again and do some testing I guess...
Last edited by Rionoskae on Fri Feb 20, 2015 1:23 am, edited 1 time in total.

User avatar
Offcenter
Posts: 182
Joined: Wed Jul 31, 2013 4:57 pm
Location: Northwestern New Jersey USA

Re: Turn-key WordPress Server Image - PressPi

Thu Feb 19, 2015 4:26 pm

Thanks for responding, Rionoskae. I'll be interested to see what you find.
George in New Jersey.
(learning a little bit every day.)
(and darned confused most of the time!)

User avatar
Offcenter
Posts: 182
Joined: Wed Jul 31, 2013 4:57 pm
Location: Northwestern New Jersey USA

Re: Turn-key WordPress Server Image - PressPi

Tue Feb 24, 2015 4:08 pm

Still can't access Wordpresspi.
Have you found anything yet, Rionoskae?
I'm about ready to wipe the card and start over.
I'm getting nowhere with it.
Thanks.
George in New Jersey.
(learning a little bit every day.)
(and darned confused most of the time!)

User avatar
Rionoskae
Posts: 204
Joined: Thu Mar 06, 2014 5:40 pm
Location: WI
Contact: Website

Re: Turn-key WordPress Server Image - PressPi

Mon Mar 16, 2015 1:06 pm

Offcenter wrote:Still can't access Wordpresspi.
Have you found anything yet, Rionoskae?
I'm about ready to wipe the card and start over.
I'm getting nowhere with it.
Thanks.
Sorry for the delayed response Offcenter - I'll run through this tonight for sure.

User avatar
Offcenter
Posts: 182
Joined: Wed Jul 31, 2013 4:57 pm
Location: Northwestern New Jersey USA

Re: Turn-key WordPress Server Image - PressPi

Tue Mar 17, 2015 2:03 am

Ok, thanks!!
George in New Jersey.
(learning a little bit every day.)
(and darned confused most of the time!)

User avatar
Rionoskae
Posts: 204
Joined: Thu Mar 06, 2014 5:40 pm
Location: WI
Contact: Website

Re: Turn-key WordPress Server Image - PressPi

Tue Mar 17, 2015 10:15 pm

Figured out what the issue was - Updating documentation now^
~Cheers

Update: Documentation has now been updated - Thanks for pointing that out :) (sorry about that!)

User avatar
Offcenter
Posts: 182
Joined: Wed Jul 31, 2013 4:57 pm
Location: Northwestern New Jersey USA

Re: Turn-key WordPress Server Image - PressPi

Wed Mar 18, 2015 11:36 pm

Thanks Rionoskae.
I assume you mean the docs under "How To Fine Tune WP Server" on
your website. It appears you added the section on changing the password
in "update your password in your wp-config.php file" using Notepad++.
I'll try it as soon as I get a chance.

Now I have another important question for you, Rionoskae. A friend of
mine is having the same problem.
Under the section "Change The Site Web Address in WordPress:", you
say to put in my domain name under "Wordpress Address" and "Site Address"
and to add it to Nginx's "Sites Available" also.
I am using NO-IP.COM's free IP forwarding and have a free host name
registered there.
I don't have a "domain" as such. What do I enter in those two places in
Wordpress and the one in Nginx?
Somehow, my site has to recognize an incoming request forwarded from NO-IP, right?
Thanks again, Rionoskae.
(I'm getting there slowly! LOL!)
George in New Jersey.
(learning a little bit every day.)
(and darned confused most of the time!)

User avatar
Rionoskae
Posts: 204
Joined: Thu Mar 06, 2014 5:40 pm
Location: WI
Contact: Website

Re: Turn-key WordPress Server Image - PressPi

Wed Mar 18, 2015 11:52 pm

Hmmm...

That is a really good question - unfortunately though I have no idea :( Perhaps when I get some time I will try to test it out..In the mean time, Domain names start at $12.00 bucks a year. ( or $1.00 a month) Might make life easier if you plan to build the site up in the future!

Barring that though - Your IP address should serve the exact same function. However if that service doesn't provide a domain name, users would have to remember your IP address. I think their might be free DNS services out there as well if you do a bit of searching.

~Cheers

User avatar
Offcenter
Posts: 182
Joined: Wed Jul 31, 2013 4:57 pm
Location: Northwestern New Jersey USA

Re: Turn-key WordPress Server Image - PressPi

Thu Mar 19, 2015 9:36 am

Ok, which IP address? My internet IP address which is dynamic and could change at any time?
Or the static IP address that I've assigned to the Pi on my home network?

Thanks!
George in New Jersey.
(learning a little bit every day.)
(and darned confused most of the time!)

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 6 guests