How to increase php memory limit.

When I am going to import demo data for my Wordpress theme,then it is showing like -

I have tried to find the php.ini.But could not found. Looking for your help.


Username: epiz_17299276

You can change, respectively add new values to your htaccess.

php_value setting_name setting_value

php_value  upload_max_filesize  10M

it should look like this:

# Wordpress Settings for plugin/upload/Dataimport

php_value  post_max_filesize  64M
php_value  upload_max_filesize  64M

.htaccess is a viable alternative if the host doesn’t allow you to touch the php.ini file. (I haven’t tried it here yet. I tried it on a different host using typo3 cms and it worked perfectly )

Good luck!

Ref:PHP: How to change configuration settings - Manual

You won’t find a php.ini on your hosting account. That file contains the PHP settings for all accounts on the server, so we can’t let you edit those.

It’s also not possible to override the values from a .htaccess file. We don’t allow you to increase those values because we don’t want people to excessively use server resources.

1 Like


@Kacer like @Admin previously said, you cannot modify maximum file size upload limits, and you cannot modify php.ini because InfinityFree hosting is a shared hosting that hosts all the websites on one directory/server. And if php.ini is modified, the changes will affect every website hosted on shared directory!