Rate Thread
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Locating and Installing PHP.ini for Wordpress
#1
Hi Guys,

Just wondering if anyone can assist me in this matter.

I'm trying to install a theme (Zip file) into my Wordpress but failed to do so.

I contacted the theme developer and he said it could due to Memory and Upload Limit in Wordpress.

He said:

Quote:Also check whether you have set resources like here

max_execution_ = 300
memory_limit = 128M
upload_max_filesize = 128M
post_max_size = 256M

So from what I understood, I can adjust the size in PHP.ini

But how can I locate or create a PHP.ini?

I read few websites on PHP.ini but ends a little bit confused.

Hope someone can help me out. Thanks.

Jay
Reply

#2
Ok normally with WP for themes you upload to the theme's directory...

located in

/wp-content/themes/yourtheme

From there you should see the theme appear in the control panel under themes, you should be able to preview it or activate it. If you get an error need to know what that actually is...

As far as PHP.ini it's location will usually be in root "/"

However if this is a Windows webserver running IIS it will be located in the program files directory and not in the public folders that you would have access to via FTP. Generally speaking most WP sites are ran under linux... Apache Web Server which is different.

Generally speaking creating a PHP.ini file in the site's root probably won't do anything. PHP is a language that WP runs on and for the most part the only thing I have ever had to change was the attachment size.

So let's start with how you are going about installing the theme. If you have FTP access I'd try downloading the ZIP file, unzipping it and then sticking it in the themes folder and see what happens as opposed from within Wordpress.

Hope that helps and not confusing you. Good to hear from you too [MENTION=21041]Jay[/MENTION]
"I’m not expecting to grow flowers in a desert, but I can live and breathe and see the sun in wintertime"
Check out my stuff!
Reply

#3
InbetweenDreams Wrote:Ok normally with WP for themes you upload to the theme's directory...

located in

/wp-content/themes/yourtheme

From there you should see the theme appear in the control panel under themes, you should be able to preview it or activate it. If you get an error need to know what that actually is...

As far as PHP.ini it's location will usually be in root "/"

However if this is a Windows webserver running IIS it will be located in the program files directory and not in the public folders that you would have access to via FTP. Generally speaking most WP sites are ran under linux... Apache Web Server which is different.

Generally speaking creating a PHP.ini file in the site's root probably won't do anything. PHP is a language that WP runs on and for the most part the only thing I have ever had to change was the attachment size.

So let's start with how you are going about installing the theme. If you have FTP access I'd try downloading the ZIP file, unzipping it and then sticking it in the themes folder and see what happens as opposed from within Wordpress.

Hope that helps and not confusing you. Good to hear from you too [MENTION=21041]Jay[/MENTION]

Hey there,

I know firsthand that you'll be the one rescuing me lol. Appreciated much.

It was a bit strange as I was not able to access FTP (Filezilla) via my Mac but able to access it with my Windows XP. Maybe I keyed in my password wrong but I tried it like 10 times doing so.

Okay, I'm able to transfer the folder into FTP and it's working now. Thanks.

Btw I have a question on PHP 101. I notice PHP has several versions. My PHP has been set default to 5.6. I see PHP version 7.1 and others. Does 7.1 mean the latest PHP? Should I change my PHP 5.6 to 7.1?

Another thing, under PHP 5.6 it has many tick options including Mysql and others. I notice only 3 options have been ticked (Mysql, ioncube_loader and zend_guard loader. Should I tick all of them or should I remain them as it is.

Sorry, I'm a noob in PHP and advance programming. Haven't done web design for 7 years plus.

Thanks for your help. I appreciate it very much.

P/S: Jack Johnson? I love Banana Pancakes.
Reply

#4
Nope don't need to change your PHP version. Doing so will most likely make WordPress stop working. I think I'm running 5.6 or something along those lines.

5.6 to 7.x is a major change. So the syntax and structure of the PHP language is modified slightly, some functions and so on might be obsoleted or modified and since WordPress, this site for instance rely on PHP changing the version of the language can often have adverse effects, particularly if you're not running the latest version of WordPress.

No need to change anything else, not sure what the other options are. MySQL is your database, all the stuff in your WordPress site is stored there, posts, pages, categories and the relationships between all that stuff.


Jack Johnson yeah, I'm not creative with usernames but wanted to change what I had...and I have several Jack Johnson albums...including the one with Banana Pancakes lol
"I’m not expecting to grow flowers in a desert, but I can live and breathe and see the sun in wintertime"
Check out my stuff!
Reply

#5
InbetweenDreams Wrote:Nope don't need to change your PHP version. Doing so will most likely make WordPress stop working. I think I'm running 5.6 or something along those lines.

5.6 to 7.x is a major change. So the syntax and structure of the PHP language is modified slightly, some functions and so on might be obsoleted or modified and since WordPress, this site for instance rely on PHP changing the version of the language can often have adverse effects, particularly if you're not running the latest version of WordPress.

No need to change anything else, not sure what the other options are. MySQL is your database, all the stuff in your WordPress site is stored there, posts, pages, categories and the relationships between all that stuff.


Jack Johnson yeah, I'm not creative with usernames but wanted to change what I had...and I have several Jack Johnson albums...including the one with Banana Pancakes lol

Okay, noted on that.

As I've mentioned earlier, I'm able to upload the theme and it works fine now. I can see the structure of the theme in my website. But according to the theme developer, if I want my Wordpress theme to look exactly like the demo that he developed, I have to enable few options in Wordpress. This is where the problem lies. Nothing happened after I enabled the options given.

So I read the manual given by the developer. He states:

Quote: 5. Why do I see a white screen when importing demo content?

If you get a white screen or some other error when trying to import our demo content, this probably happens because of the maximum execution time limit. You need to increase the maximum execution time (upload time) setting of your web server. The default maximum execution time on web servers is 30 seconds. Please increase it to 120 seconds. Possible ways of achieving this are:

By Wp-config.php changes - set_time_limit(120);
In htaccess - php_value max_execution_time 120;
In php.ini file - max_execution_time = 120

Can I just change all these via 'Select PHP Version' inside my CPanel (Linux)? or do I have to do each one of them separately?

Thanks. Sorry for so many questions.

Jay
Reply

#6
Jay Wrote:Okay, noted on that.

As I've mentioned earlier, I'm able to upload the theme and it works fine now. I can see the structure of the theme in my website. But according to the theme developer, if I want my Wordpress theme to look exactly like the demo that he developed, I have to enable few options in Wordpress. This is where the problem lies. Nothing happened after I enabled the options given.

So I read the manual given by the developer. He states:



Can I just change all these via 'Select PHP Version' inside my CPanel (Linux)? or do I have to do each one of them separately?

Thanks. Sorry for so many questions.

Jay

Does Cpanel let you make changes to the .htaccess and php.ini files? If you can change it through that go ahead and do it. I checked mine and the default is 300, so if you can't get to where you can change it, go under the assumption that it is more than 120 and edit wp-config.php

"wp-config.php" is located in the root"/" directory of your wordpress... download it from FTP. Open in a text editor (I use Notepad++ for this sort of thing) and do a CTRL+F for Find and type in "set_time_limit" and see that the value is at least 120. Save it, Upload back to the folder, overwrite if prompted by Filezilla. The change is immediate so you don't have to wait or restart anything.
"I’m not expecting to grow flowers in a desert, but I can live and breathe and see the sun in wintertime"
Check out my stuff!
Reply

#7
Quote:Does Cpanel let you make changes to the .htaccess and php.ini files? If you can change it through that go ahead and do it. I checked mine and the default is 300, so if you can't get to where you can change it, go under the assumption that it is more than 120 and edit wp-config.php

"wp-config.php" is located in the root"/" directory of your wordpress... download it from FTP. Open in a text editor (I use Notepad++ for this sort of thing) and do a CTRL+F for Find and type in "set_time_limit" and see that the value is at least 120. Save it, Upload back to the folder, overwrite if prompted by Filezilla. The change is immediate so you don't have to wait or restart anything.
1 Day Ago 03:53 pm

Well in my Cpanel (Linux), I have a page called 'Select PHP Version':

[Image: PHP01_zps6hadlle2.jpg]

Which leads me to this page

[Image: PHP04_zps5jhorkf4.jpg]

So can I change the htaccess - php_value max_execution_time 120 via the page above? As you can see, the current max execution time is 30. Or is this a different thing completely?

As for the Wp-config.php changes - set_time_limit(120); I will change via FTP as you have suggested. I will let you know soon.

For php.ini file - max_execution_time = 120; do I have to do it separately too? I mean by locating php.ini (<?php phpinfo(); ?>) and then change the value like Wp-config.php as well?

Thanks Mike.

Jay
Reply

#8
Probably use the multi php ini editor on cpanel
"I’m not expecting to grow flowers in a desert, but I can live and breathe and see the sun in wintertime"
Check out my stuff!
Reply

#9
Jay Wrote:So can I change the htaccess - php_value max_execution_time 120 via the page above? As you can see, the current max execution time is 30. Or is this a different thing completely?
Different thing... you might not be able to see or edit the htaccess, might be something on the cpanel.... The one you're looking at is the same as the php.ini, so you can it there and go to the next thing...
Quote:As for the Wp-config.php changes - set_time_limit(120); I will change via FTP as you have suggested. I will let you know soon.

For php.ini file - max_execution_time = 120; do I have to do it separately too? I mean by locating php.ini (<?php phpinfo(); ?>) and then change the value like Wp-config.php as well?

Thanks Mike.

Jay
If you do the above you won't have to do it here...
"I’m not expecting to grow flowers in a desert, but I can live and breathe and see the sun in wintertime"
Check out my stuff!
Reply

#10
Okay noted. I will do the changes. I will let you know how it goes.

Thanks Mike.

Jay
Reply



Forum Jump:


Recently Browsing
8 Guest(s)

© 2002-2024 GaySpeak.com