Wordpress: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Problem with loading web-interface==
Assuming you want to run wordpress with apache/xampp on a local testserver. After setting up xampp and testing phpinfo() download wordpress and copy it into htdocs. Then you need to edit wp-config.php as instructed on the wordpress-installation-page.
Assuming you want to run wordpress with apache/xampp on a local testserver. After setting up xampp and testing phpinfo() download wordpress and copy it into htdocs. Then you need to edit wp-config.php as instructed on the wordpress-installation-page.
Next step would be executing wp-admin/install.php in your browser.
Next step would be executing wp-admin/install.php in your browser.
Unfortunately nothing happens and the site stays blank. Then try the following:
Unfortunately nothing happens and the site stays blank. If this is the case try the following hints:
* Restart your computer ;-)
* Restart your computer ;-)
* Edit install.php (fe. add some html-testing code at the beginning of the file). By doing this you make sure to have proper access to the page. Anyway an errormessage (fe. 500)would have informed you before about wron access settings
* Edit install.php (fe. add some html-testing code at the beginning of the file). By doing this you make sure to have proper access to the page. Anyway an errormessage (fe. 500) would have informed you before about wrong access settings
* Try [http://wordpress.org/support/topic/error-500-on-running-installphp?replies=3 this]
* Try [http://wordpress.org/support/topic/error-500-on-running-installphp?replies=3 this]
* Try [http://wordpress.org/support/topic/installphp-not-working-2 this]
* Try [http://wordpress.org/support/topic/installphp-not-working-2 this]
Line 10: Line 11:
* [http://stackoverflow.com/questions/2195252/in-wordpress-php-files-within-the-theme-folder-do-not-run-but-return-404-error php files return error 404]
* [http://stackoverflow.com/questions/2195252/in-wordpress-php-files-within-the-theme-folder-do-not-run-but-return-404-error php files return error 404]
* [http://www.apachelounge.com/viewtopic.php?p=16806 enable php error messages]
* [http://www.apachelounge.com/viewtopic.php?p=16806 enable php error messages]
==How to enable permalinks on wordpress==
In order to display links as permalinks (/es/pagename/ instead of something like index.php?lang=es&page=product) the following steps are necessary:
* Make sure that in the apache httpd.con the mod_rewrite module is activated; if necessary uncomment or add the following line:
  LoadModule rewrite_module modules/mod_rewrite.so
* Restart apache
* Enable AllowOverride. Go to the according section in httpd.conf and add/edit the code. At the end your code should look like the following:
  < Directory/ >
      Options FollowSymLinks
      AllowOverride All
      Order deny,allow
      Deny from all
  < /Directory >
* Restart apache
* Create a .htaccess-file in the folder that contains the template-php-files. Please see [http://codex.wordpress.org/Using_Permalinks#Creating_and_editing_.28.htaccess.29 here]
* If you are using qtranslate (which is the case for the openpetra-website) go on the wordpress-admin-interface to Settings -> Languages -> Advanced Settings and activate "Use Pre-Path Mode".
* Go on the wordpress-admin-interface to Settings -> Permalinks and enter as Custom Structure "/%lang%/%postname%.php"
That's it
You can find further information on the following pages:
* [http://codex.wordpress.org/Using_Permalinks Using Permalinks]
* [http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=4&t=78 General information]
==General php things==
If you want to debug php please have a look at the following links
* [http://phpdebuglib.de/ http://phpdebuglib.de/]
* [http://bueltge.de/php-debugging-und-profiling-leicht-gemacht/520/ bueltge.de] - unfortunately in German

Latest revision as of 12:37, 25 March 2011

Problem with loading web-interface

Assuming you want to run wordpress with apache/xampp on a local testserver. After setting up xampp and testing phpinfo() download wordpress and copy it into htdocs. Then you need to edit wp-config.php as instructed on the wordpress-installation-page. Next step would be executing wp-admin/install.php in your browser. Unfortunately nothing happens and the site stays blank. If this is the case try the following hints:

  • Restart your computer ;-)
  • Edit install.php (fe. add some html-testing code at the beginning of the file). By doing this you make sure to have proper access to the page. Anyway an errormessage (fe. 500) would have informed you before about wrong access settings
  • Try this
  • Try this

For more information please have a look at the following links:

How to enable permalinks on wordpress

In order to display links as permalinks (/es/pagename/ instead of something like index.php?lang=es&page=product) the following steps are necessary:

  • Make sure that in the apache httpd.con the mod_rewrite module is activated; if necessary uncomment or add the following line:
 LoadModule rewrite_module modules/mod_rewrite.so
  • Restart apache
  • Enable AllowOverride. Go to the according section in httpd.conf and add/edit the code. At the end your code should look like the following:
 < Directory/ >
     Options FollowSymLinks
     AllowOverride All
     Order deny,allow
     Deny from all
 < /Directory >
  • Restart apache
  • Create a .htaccess-file in the folder that contains the template-php-files. Please see here
  • If you are using qtranslate (which is the case for the openpetra-website) go on the wordpress-admin-interface to Settings -> Languages -> Advanced Settings and activate "Use Pre-Path Mode".
  • Go on the wordpress-admin-interface to Settings -> Permalinks and enter as Custom Structure "/%lang%/%postname%.php"

That's it

You can find further information on the following pages:

General php things

If you want to debug php please have a look at the following links