Web Hosting Forum | Lunarpages

Author Topic: PHP Ini Error When Uploading WordPress Template  (Read 5104 times)

Offline stewpixie

  • Trekkie
  • **
  • Posts: 11
PHP Ini Error When Uploading WordPress Template
« on: May 09, 2015, 04:58:42 PM »
Hi,

I have tried to upload a WordPress template from my my WordPress Admin Panel and I had the following message: The uploaded file exceeds the upload_max_filesize directive in php.ini. I googled and it said I should find the php,ini file and search for upload_max_filesize and change this code. I don't even know where I would find this. I have a WordPress template that I bought from themeforest.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6205
Re: PHP Ini Error When Uploading WordPress Template
« Reply #1 on: May 10, 2015, 08:26:50 AM »
First of all, if you are merely uploading a file, you may be able to do that with an FTP client or your hosting control panel's file manager. This would bypass the PHP setting limitation entirely.

Most hosting accounts do not come with a php.ini file. If you want to change some setting, you normally have to create the php.ini file yourself. It often lives in the site root (/) but might be placed elsewhere (such as above /, to prevent unauthorized access), and an entry placed in .htaccess (usually suPHP_ConfigPath /full/dir/path/to/file) to tell PHP where to find php.ini. Your host (LP) will be able to tell you any such details. If you're using a Windows server, though, the details will be different.

Before and after changing php.ini, run the following script:
Code: [Select]
<?php phpinfo(); ?>to see what the old setting was, and make sure the php.ini does change the desired setting.
« Last Edit: May 10, 2015, 08:31:49 AM by MrPhil »
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

Offline stewpixie

  • Trekkie
  • **
  • Posts: 11
Re: PHP Ini Error When Uploading WordPress Template
« Reply #2 on: May 10, 2015, 06:30:58 PM »
Thanks Mr. Phil,

I think I will contact the tech support. I looked at the php.ini but didn't see anything that would allow me to change the maximum size.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6205
Re: PHP Ini Error When Uploading WordPress Template
« Reply #3 on: May 11, 2015, 06:38:24 AM »
If it's not there, you have to add it:
Code: [Select]
upload_max_filesize = 20Metc.
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

Offline doncht

  • Intergalactic Cowboy
  • *****
  • Posts: 63
Re: PHP Ini Error When Uploading WordPress Template
« Reply #4 on: August 01, 2015, 10:43:55 AM »
Hi, once things are made, do we need to restart php for this to take effect?

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6205
Re: PHP Ini Error When Uploading WordPress Template
« Reply #5 on: August 01, 2015, 12:48:17 PM »
On a shared server, no. On VPS/cloud or dedicated, you might need to restart something. From the tenor of the original question, I would assume the OP is a beginner on a shared server.
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

 

Share |