How to Import a Large WordPress XML File and Override the Default Limits

Wordpress Blog - iconWordPress has a function in the administration area where you can export your blog content and import them unto a new blog installation. That works fine as is if you are importing a small file. However, when your file is larger than 2MB, the problem starts. The default limit for uploading an XML import file via the WordPress admin area is 2MB. Here’s a way to override that limit using htaccess.

First, open Notepad (or a text editor) to create a file and name it “.htaccess”

Upload this .htaccess file into the root directory of your server (where your site resides).

Cut and paste the code below into the .htaccess file:

#set max upload file size
php_value upload_max_filesize xxM

#set max post size
php_value post_max_size xxM

Change the “xx” variable to a number that meets your requirements. For example, my latest client needed me to import a 28MB XML file, so I just went ahead and changed the “xx” variable to 48. I was then able to import the WordPress XML file successfully.

Here’s what the final .htaccess file looks like:

#set max upload file size
php_value upload_max_filesize 48M

#set max post size
php_value post_max_size 48M

Hope this solution works out for you!

*If you need help with your WordPress blogs, just contact me with your project requirements. I’ll then respond with a quote accordingly.

Bryan - After5PC

Husband. Father. Entrepreneur. Techie. Mental Health Nurse. Music. Speaker. Isaiah 60:1

I have been providing a range of services for clients with their personal or small business needs on the internet for over 14 years. Contact me if you need anything. You can certainly rely on me wherever you are located in the world. If you have access to the web, I can help you anywhere!

request my service Digital Marketing Agency Porter Kingwood Humble The Woodlands Conroe Spring Cleveland Texas
Bryan - After5PC

Honestly... I just don't want my website to be like everyone else's!

I know it looks simple and ugly to some, but I don't want the design to look like a major business corporation. It is not. You are dealing with only one person with a big heart! A heart that established this small business through thick and thin... a heart that has endured for the last 14 years. You simply get... me! I will work hard on your project, just like I worked hard to keep this business going. Give me a chance. You won't regret it!

contact me Digital Marketing Agency Houston Sugar Land Missouri City Pearland Richmond Rosenberg Baytown Crosby Texas
Bryan - After5PC

Connect with me via my business social media pages:

Follow Me on Social Media New Caney Splendora Atascocita Tomball Montgomery Katy Texas
Legal Notices | Terms and Conditions
© Copyright 2019 - Duplication of content and images on this site without prior authorization is prohibited