WordPress FAQ’s
- Disable or limit the number of revisions per post
- Increase The Upload Limit In The Wordpress Uploader?
- Wordpress: Changing The Site URL for testing purposes
- Disable or limit the number of revisions per post
-
The introduction of Post Revisions for WordPress is a wonderful thing – however, unlimited post revisions can cause databases to become rather large. Large databases can cause sites to load more slowly – and may cause problems with various hosting providers for long database transaction times…
Imagine, 50 posts on a site and 6 revisions per post – that’s 300 entries in the database… a lot!
Unlimited Post Revisions are not necessarily needed but being able to have several Post Revisions available is a helpful thing.
It is possible to limit the number of post revisions to a more manageable number by adding one line to the wp-config.php file of your WordPress Install.
To completely disable Post Revisions on your WordPress website – so no post revisions are recorded, add the following line to the wp-config.php file:define('WP_POST_REVISIONS', 'false');To limit the number of post revisions per post, add the following line to the wp-config.php file:
define('WP_POST_REVISIONS','5′);This will limit the number of post revisions to 5. To change the number of post revisions, change 5 to any other number.
These lines need to be added above the last line in wp-config.php:
/** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php');
- Increase The Upload Limit In The Wordpress Uploader?
-
Ever wondered how to use the built in WordPress Uploader to upload your ‘larger’ files (like audios and videos), but your stuck at 64 K or some ridiculously low limits?
Well, the maximum size of a file that may be uploaded through the WordPress media uploader is set by the web servers’ php configuration. If your webhost allows you to edit your php settings, you can use a php.ini or .htaccess file to override the upload limits – check with your webhost for more details.
Using php.ini
The php.ini file should be located in the root folder of the word press install. Exercise care when editing an existing php.ini file.
Add the following line to the php.ini
post_max_size = 32M
upload_max_filesize = 32MUsing .htaccess
The .htaccess file should be located in the root folder of the word press install. Exercise care when editing an existing .htaccess file.
Add the following line to the .htaccess
php_value post_max_size = 32M
php_value upload_max_filesize = 32MIn both examples, the wordpress uploader will be able to upload files up to 32MBytes in size.
- Wordpress: Changing The Site URL for testing purposes
-
When migrating a wordpress website to a new hosting provider, or replicating it for testing purposes, it’s necessary to change the site url so the site will function correctly – if you don’t want to change the dns settings for your live site.
There are several ways of doing this mentioned on the WordPress Codex for Changing the Site URL, but my favorite method for quick testing. This will allow your replicated site to display correctly, and leave your production site to function unhindered.
In wp-config.php, add the following two lines:
define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');These two lines should be added anywhere above the last two lines in the file:
/** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php');
Remember to remove these two lines when testing is complete and the site goes live!

