Installing Wordpress on Redbrick: Difference between revisions

From Redbrick Wiki
Jump to navigation Jump to search
(Doh! Seems you do need the fix for the dashboard!)
No edit summary
 
(37 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[http://wordpress.org Wordpress] is a nifty open-source PHP Content Management (or "blogging") web tool. You can use it to handle your website blog with ease.  
[http://wordpress.org WordPress] is a nifty open-source PHP Content Management (or "blogging") web tool. You can use it to handle your website blog with ease.


It is very easy to install on Redbrick. For the most part the instructions bundled with it are correct.
__TOC__


You will need to have an SQL account so if you don't have one [http://www.redbrick.dcu.ie/help/faq/#sqlaccess email the admins].  
==Installation==
If you don't already have an SQL account, email the [[admins]] to get one. Make sure your permissions are good and then follow this [http://codex.wordpress.org/Installing_WordPress handy guide].


The only difficulty is that because it's a PHP and your trying to run it on Redbrick you've got to modify the files. You need to add '#!/usr/local/bin/php' to the beginning of any PHP file that will be excuted. But which ones?
==Setting with SSH==
Right so, the permissions on Wordpress can trick you up - if you don't use the right command. So butlerx and pints got sick of all the little problems so wrote a [https://git.redbrick.dcu.ie/Redbrick/eduScripts/src/master/setupWordpress script] for it  
* Login into Redbrick from Terminal or PuTTY (or some other SSH client).
* Download the script:
<code>wget https://git.redbrick.dcu.ie/Redbrick/eduScripts/raw/master/setupWordpress</code>
* Run the script:
<code>bash setupWordpress</code>
* Follow the prompts of the script
*You now have "wordpress" in your public_html folder, and that's basically as much as you need to do from your SSH connection.  <code>https://'''YOURUSERNAME'''<nowiki>.redbrick.dcu.ie/</nowiki></code>
*You need to check the permission on config.php also, so that it is 400.
<code>chmod 400 wp-config.php</code>
*Follow the WordPress instructions there, you will need a Mysql database at this point just email admins for one


Well I've already done it so here is the list of files you'll need to modify to get it installed and up and running. There maybe more but they'll be corner cases rather than anything else. This is only applicable to version 2.0!


These changes are also applicable to the latest version 2.0
[[Category:HowTo]]
index.php
wp-comments-post.php
wp-login.php
wp-pass.php
wp-print.php
wp-register.php
wp-rss.php
wp-trackback.php
xmlrpc.php
wp-admin/edit-comments.php
wp-admin/categories.php
wp-admin/edit-pages.php
wp-admin/edit.php
wp-admin/import.php
wp-admin/index.php
wp-admin/install.php
wp-admin/link-add.php
wp-admin/link-categories.php
wp-admin/link-import.php
wp-admin/link-manager.php
wp-admin/moderation.php
wp-admin/options-discussion.php
wp-admin/options-general.php
wp-admin/options-misc.php
wp-admin/options-reading.php
wp-admin/options-permalink.php
wp-admin/options-writing.php
wp-admin/options.php
wp-admin/page-new.php
wp-admin/plugin-editor.php
wp-admin/plugins.php
wp-admin/post.php
wp-admin/profile.php
wp-admin/templates.php
wp-admin/theme-editor.php
wp-admin/themes.php
wp-admin/upgrade.php
wp-admin/users.php
wp-admin/upgrade.php
wp-admin/profile-update.php
wp-admin/inline-uploading.php
 
Once you've correctly modified the files, you can follow the instructions included with Wordpress to finish the installation.
 
==Fixing the Dashboard== 
   
But there is one final step. Once installed and working, you may notice that the "Dashboard", the page that welcomes you when you login, looks a bit ''blank''. Well this is because Wordpress is attempting to download other websites relevant to Wordpress such as the Wordpress Dev Blog.   
 
To fix this, open 'wp-include/class-snoopy.php' and search for 'var $proxy_host'. Set 'proxy_host' to "proxy.dcu.ie", 'proxy_port' to "8080". 
   
var $proxy_host = "proxy.dcu.ie"; 
var $proxy_port = "8080";
 
Now search for the variable '_isproxy' and set it to "true". 
   
var $_isproxy = true; 
 
Now the dashboard should work properly.
 
==Permalinks==
 
If your using a vhost, 'mod_rewrite' is not enabled by default. This means that Wordpress Permalink optinos do not work. You must [http://www.redbrick.dcu.ie/cgi-bin/writemail.pl?username=admin-request email the admins] and ask them to enable it for your domain.
 
''Is 'mod_rewrite' enabled for normal redbrick webpages?''

Latest revision as of 10:24, 7 June 2017

WordPress is a nifty open-source PHP Content Management (or "blogging") web tool. You can use it to handle your website blog with ease.

Installation

If you don't already have an SQL account, email the admins to get one. Make sure your permissions are good and then follow this handy guide.

Setting with SSH

Right so, the permissions on Wordpress can trick you up - if you don't use the right command. So butlerx and pints got sick of all the little problems so wrote a script for it

  • Login into Redbrick from Terminal or PuTTY (or some other SSH client).
  • Download the script:
wget https://git.redbrick.dcu.ie/Redbrick/eduScripts/raw/master/setupWordpress
  • Run the script:
bash setupWordpress
  • Follow the prompts of the script
  • You now have "wordpress" in your public_html folder, and that's basically as much as you need to do from your SSH connection. https://YOURUSERNAME.redbrick.dcu.ie/
  • You need to check the permission on config.php also, so that it is 400.
chmod 400 wp-config.php
  • Follow the WordPress instructions there, you will need a Mysql database at this point just email admins for one