Title: php 4 and php 5
Last modified: August 19, 2016

---

# php 4 and php 5

 *  [warhonowicz](https://wordpress.org/support/users/warhonowicz/)
 * (@warhonowicz)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-4-and-php-5/)
 * I host wordpress on my own site under [http://www.warhonowicz.com](http://www.warhonowicz.com)
   with a German host called greatnet. The server has both php4 and php 5 installed
   and one of my plugins is now telling me I should use php5.
 * My question is, how do I change it?
 * I asked my host and they said to rename all files ending in .php to .php5 which
   seems to me a recipe for disaster as I don’t think wordpress or any plugins would
   work after that.
 * I found this topic [http://wordpress.org/support/topic/291725?replies=7](http://wordpress.org/support/topic/291725?replies=7)
   and one answer was to add an entry to .htaccess but I do not have that file. 
   Can I just create it and if so, where?

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331001)
 * If you have set up a custom permalink structure, you should have an .htaccess
   file in your root WordPress folder. Make sure that the FTP client or file management
   software is configured to show **all** files.
 * If you’re absolutely sure that you do not have such a file, you can create it
   in a plain text editor (e.g NotePad) and add:
 * `AddType x-mapp-php5 .php`
 * to the top of the file followed by a single blank line. Save the file as `.htaccess`(
   no extension and don’t forget the preceding ‘.’), then upload it in ASCII format
   using FTP (or whatever file management software that your host provides) to your
   root WordPress folder.
 *  Thread Starter [warhonowicz](https://wordpress.org/support/users/warhonowicz/)
 * (@warhonowicz)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331118)
 * I tried that and at the same time asked my host if it should work. They came 
   back and said that based on their server architecture it would not work, the 
   only way to use php5 on the server my site is hosted on would be to rename all.
   php files to .php5 … looks like I am going to have to bite the bullet and either
   do that or take my host up on their offer to move my site to a server that uses
   php5 as standard
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331125)
 * I’ve never heard of using .php5 files before..
 * Perhaps they mean you need to add the type and handler, ie..
 *     ```
       AddHandler application/x-httpd-php5 .php
       AddType application/x-httpd-php5 .php
       AddHandler application/x-httpd-php .php4
       AddType application/x-httpd-php .php4
       ```
   
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331128)
 * Q1. Can you survive without access to PHP4?
    Q2. Are your hosts offering to move
   your site for free?
 * If the answer to both questions is “Yes”, take them up on their offer. Far better
   for you long term.
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331129)
 * Agreed, if the host is willing to do the leg work, take them up on the offer.
 * Ensure either you or your host backs up your data beforehand though “just incase”…
 *  Thread Starter [warhonowicz](https://wordpress.org/support/users/warhonowicz/)
 * (@warhonowicz)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331222)
 * The reason why I am looking into this issue is that I use NextGEN Gallery and
   some of it’s functions are only available under php 5.
 * I have asked my host whether they would help in moving but have not yet had a
   reply.
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331240)
 * If PHP 5 is installed (along with PHP 4), then all you need do is add the handler
   and type like i’ve shown above.
 * It would go into your htaccess file.
 * Pass the code along to your host for approval if you like, i’m pretty confident
   that’s what they’re referring to ..
 * Or perhaps what emsi suggested..
 * I’ve not had to do it myself, but it’s only the sake of updating your htaccess
   for a few moments, if it doesn’t work you can always remove the code… 🙂
 *  Thread Starter [warhonowicz](https://wordpress.org/support/users/warhonowicz/)
 * (@warhonowicz)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331246)
 * I did pass the htaccess to my host and they rejected it, they did however move
   all my files to a new server with php5, installed WP and pixelpost for me and
   tested it from their end.
 * They then gave me temporary access to the new server under a different domain
   so I could test and set up my email accounts on the new server. Once I was happy
   thay changed the actual DNS entries so my site now runs on a new server … happy!
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331247)
 * That’s nice of them… 🙂
 *  [spotcream](https://wordpress.org/support/users/spotcream/)
 * (@spotcream)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331293)
 * I have a similar problem i upgraded to php5 and could not access the site so 
   i placed into the AddHandler application/x-httpd-php5 .php
    .htaccess file and
   my site appeared but i am unable to login to the admin section of the site do
   you have anyideas. I checked with a php info and the .htaccess is using php5.
 * my .htaccess
 * AddHandler application/x-httpd-php5 .php
 * <Limit GET POST>
    order deny,allow deny from all allow from all </Limit> <Limit
   PUT DELETE> order deny,allow deny from all </Limit> AuthName spotcream.com AuthUserFile/
   home/spot/public_html/_vti_pvt/service.pwd AuthGroupFile /home/spot/public_html/
   _vti_pvt/service.grp
 * # BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond%{
   REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.
   php [L]
 * </IfModule>
 * # END WordPress

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘php 4 and php 5’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [php4](https://wordpress.org/support/topic-tag/php4/)
 * [php5](https://wordpress.org/support/topic-tag/php5/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 4 participants
 * Last reply from: [spotcream](https://wordpress.org/support/users/spotcream/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/php-4-and-php-5/#post-1331293)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
