• goldenrulephotographer

    (@goldenrulephotographer)


    ————–
    I wrote:
    ————–
    The process sent me a link to a zip file which I extracted. This resulted in two files. The first was 2,311 KB. The second was 1,019 KB.

    I then went to my new local site which currently has just the default content. I attempted to import the files. There was a message Maximum size: 2 MB. I selected the first file which again is 2,311 KB OR 2.3 MB. Attempting to import it gave me this error…
    Import WordPress
    Sorry, there has been an error.
    The uploaded file exceeds the upload_max_filesize directive in php.ini.

    Why would this process create a file that is larger than the process allows to be used? More importantly, how do I get around the problem?

    ————–
    James Huff wrote:
    ————–
    The maximum upload size is controlled at the server-level, not by WordPress. Here are two ways you can increase the upload limit:

    1. If you can edit or override the system php.ini file, increase the maximum file and post sizes. For example, upload_max_filesize = 100M ; and post_max_size = 100M ;

    2. If you cannot edit or override the system php.ini file, add php_value upload_max_filesize 100M and php_value post_max_size = 100M to your .htaccess file.

    (in the above examples, the limit is set to 100MB)

    ————–
    my response
    ————–

    I really appreciate the help.

    There is no php.ini anywhere on my computer so I’m trying to modify the .htaccess file.

    Both of my attempts caused a server error on my local site. I’ve tried stopping and restarting apache and mysql in xampp but that didn’t help. Here are my two attempts.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /tbcc/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /tbcc/index.php [L]
    php_value upload_max_filesize 100M
    php_value post_max_size = 100M
    </IfModule>

    # END WordPress

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /tbcc/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /tbcc/index.php [L]
    </IfModule>
    php_value upload_max_filesize 100M
    php_value post_max_size = 100M

    # END WordPress

Viewing 5 replies - 1 through 5 (of 5 total)
  • InterServer

    (@interservernet-web-hosting)

    php.ini file should be there in the server. You can retrieve the file location using the following ways.

    1: Type the following command in terminal and the output will be the location of php.ini.

    php -i | grep ‘php.ini’

    2: You can use phpinfo() page to find the loaded PHP configuration file.

    Create a file named phpinfo.php in the root directory of the domain. Then add the following lines.

    <?php

    // Show all information, defaults to INFO_ALL
    phpinfo();

    ?>

    Once added please access file from browser and you can see the details about PHP.

    Thread Starter goldenrulephotographer

    (@goldenrulephotographer)

    It turns out a single equal sign was the cause of the problem. My .htaccess file looks like this now and I know longer get the maximum size message or the server error.

    I changed this
    php_value post_max_size = 100M
    to this
    php_value post_max_size 100M

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /tbcc/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /tbcc/index.php [L]
    php_value upload_max_filesize 100M
    php_value post_max_size = 100M
    </IfModule>

    # END WordPress

    Dion

    (@diondesigns)

    1: Type the following command in terminal and the output will be the location of php.ini.

    php -i | grep ‘php.ini’

    That command will not work on a Windows system. You would instead do something like:

    php -i | more

    then locate the php.ini information on the first displayed page, and then press Ctrl-C to exit the display.

    To the OP: you still have an “equals” sign in one of your php_value statements. If you want that directive to work, you must remove the “equals” sign.

    Thread Starter goldenrulephotographer

    (@goldenrulephotographer)

    Sorry for the confusion in the post. I had removed the equals sign from the command.

    Is the modification I’ve done sufficient or is there some advantage to the php.ini version that I should consider?

    Dion

    (@diondesigns)

    What you’ve done is sufficient…no need to mess around with php.ini.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WordPress export exceeds maximum upload size’ is closed to new replies.