Ask your WordPress questions! Pay money and get answers fast! (more info)

Could WP Questions (TMA) be built with WordPress?

  • SOLVED

A number of people have written to us and asked why WP Questions was not built with WordPress. Possibly they do not understand what we are trying to do. Or, possibly, I am ignorant. The important thing to keep in mind is that we are trying to build software that can handle thousands of websites. I am not sure how to build this software with WordPress. So I'll ask this crew, could you build the TMA software with WordPress?

Here are some of the things we are doing, and I'm curious how you would do this with WordPress.

1.) Every owner of a website gets FTP access to their css files, their images, their Javascript files, but the website owners do not get access to any PHP files, since that would be a security risk.

2.) Several thousand websites (hopefully) should be able to run off of one installation of the software. The software will live on the server in the directory:

/home/codewise/core

This is where the PHP files and all the default template files will live. The web site owners will not have access to this.

3.) Easy deploy of new code: the developers (I mean me and Chris and Misty) can deploy from Subversion to /home/codewise/core and this automatically grants new funcationality and new templates to each website (of which there might be thousands).

4.) A web interface so the web site owners can edit any template. The custom templates get stored in /home/codewise/core/custom. No PHP is allowed in the templates but there is a system of template tags that translates back to PHP. For security reasons, no web site owner is ever allowed to write any PHP code.

5.) Easy cron: we have 8 cron scripts that handle things like voting and sending money to and from the Community Pot. There needs to be an easy, automated way these scripts get called on several thousand websites.

6.) Easy cache management: when we deploy a change that requires the cache to be cleared, its useful to us if we can clear the cache for every site, with one command. And in the future this might be several thousand sites.

7.) Cache control of custom templates. Even when the user overrides the default templates and creates their own templates, there should be a way for us to specify in the code how often the custom template should be cached.

8.) Any error message in the software needs to be a variable, so that web site owners can easily translate the message into various languages (French, Russian, etc).

As it is, we built this software with a modified version of the [[LINK href="http://www.symfony-project.org/"]]Symfony[[/LINK]] framework. But I'm curious, if you were doing this with WordPress, how would you handle the above 8 items?

I should add, all images and css and Javascript files live in the directory of the website owner. For instance, one of our beta-testers set up [[LINK href="http://questfr.com/"]]QuestFr[[/LINK]], so all their images and css and Javascript are at:

/home/questfr/public_html/images

/home/questfr/public_html/js

/home/questfr/public_html/css

Answers (3)

2011-08-23

Pixel Coder answers:

1) FTP access, the limitation of Multi site is you would either be mapping a domain name or using subdomains / directories from the core install. Just speculating right now, but it would be possible to clone a theme at each new site creation. Making it unique. You could then allow access to the theme via an ftp account with permissions to the directory.

Having FTP access from 1000s of sites not to mention the hits on the files being served would put a huge load on the machine hosting this so I suspect you would need someone smart working on that.

Already neglected work today, so better get back to it.


Lawrence Krubner comments:

Thank you. We do have someone smart keeping the servers running:

[[LINK href="http://codewi.se/2010/05/13/chris-clarke-helps-codewise-running/"]]http://codewi.se/2010/05/13/chris-clarke-helps-codewise-running/[[/LINK]]

Our main server is on the RackSpace Cloud and, in theory, can expand a great deal to handle increasing demands.


Lawrence Krubner comments:

The clone-a-theme idea could perhaps be made to work, but I think a new template system would have to be invented. Allowing PHP in the templates means we need to deal with 1 of 2 issues:

1.) security

or:

2.) how to we add new functionality to an existing site?

2011-08-23

Milan Petrovic answers:

I have been working with WordPress for 5 years now, and I don't work with any other CMS or framework any more. There is hardly anything you can't build with WordPress. Some of your requests here can't be done with any current CMS without writing specialized plugins, but it sure is doable.

1. This one is more of a server thing, but it can be built in WP differently through some sort of file manager (no need for FTP at all).
2. WordPress runs in multisite or network mode, you can have unlimited number of websites on one installation. WordPress.com is built that way: 15.000.000 websites on one WP installation. Only site admins have access to system files, individual website owners don't.
3. WordPress plugins and themes can be sitewide, so when you change the code for plugins or themes, all sites will use it. You can't have 2 different versions of the same plugin in WordPress, all are stored in same place.
4. This will require a plugin. WordPress templates are combination of PHP/HTML/CSS, and also individual sites can't modify them. To make this work you need your own editor with limitations. WP.com has a system built to allow users to do something similar.
5. WordPress has own Cron Scheduler built in.
6. Plenty of cache plugins, best one is W3 Total Cache.
7. This is not working like that, and again, since you will need your own handling for templates that individual users can edit, you can built cache control in that plugin.
8. WordPress has full support for multilanguage websites through own translation system, if the plugins are written to use it. There are even plugins to have multiple versions of same posts in different languages.

I have my own templating system used by several of my plugins to format plugin output without modifying themes, and that system can be used for much more.

Milan


Milan Petrovic comments:

If you want to use WordPress, you must follow the WordPress rules of doing things, just as with any other CMS or framework. Allowing hundreds FTP accounts for file uploads is non necessary not to mention archaic. Users will expect a higher level of customization that will need to be done through the interface, not by primitive FTP. There are many choices to bring file manager to end user with limiting the access to some folders. In WordPress each website in multisite installation will get it's own folder for file storing, so that can be visible to file manager built in the plugin.


Lawrence Krubner comments:

Yes, good points. I suppose one has to create one's own template system no matter what one does.

You make a good point in #2.

I think #6 means that we give up control of the cache, and leave that to the website owner? I suppose that is acceptable.

#1 sounds like a lot of work. You're thinking of some kind of custom Flash uploader? Web site owners will surely want to bulk upload images.


Milan Petrovic comments:

1. WordPress has built in uploader and it supports bulk uploads of images and other media (you can limit that).
6. W3TC can refresh cache for individual sites only, or for whole network, and support CDN, CloudFlare and bunch of other modern cache systems. Symphony and other frameworks rely on internal cache control for everything, and that is once again, archaic.


Lawrence Krubner comments:

Thanks for the tip about W3TC. That is impressive.

2011-08-23

Julian Lannigan answers:

I definitely agree that this can be done in Wordpress. I do also agree that you will probably cause more of a headache than you would solve. I love Wordpress don't get me wrong, but why reinvent a wheel that is already spinning near perfect? WPQ is a specialized application and to ask the question, <strong>"Why is WPQ not built with Wordpress?" <em>is irrelevant</em></strong>. As long as WPQ works and provides us the ability to ask and answer questions, who cares what it's built upon?


Lawrence Krubner comments:

Thank you for that. I'm going to quote you next time someone complains that WPQ is not built with WordPress.