WordPress does not provide you the ability to download Codex for offline use. So, what do you do when you need to go to places where there is slow internet connection or if you’d like to browse the codex in offline mode? Here’s two methods to do it.


MediaWiki is the same software that runs Wikis on the internet (ex. Wikipedia, WordPress Codex etc.) So, all you have to do is set up a local copy of MediaWiki, then export the pages you want through WordPress Codex and then import it into your local installation of MediaWiki.

To run MediaWiki on your local computer, you need to install a Web server (like Apache) , database server (like MySQL) and PHP.  Installing all those software independently will be troublesome. So, just use Xampp to install and configure MediaWiki. It comes with Apache, PHP and MySQL, so that you don’t need to install everything independently.

Once you install Xampp, install MediaWiki.

Now, head over to Codex Export page. This page lets you mark which pages or categories you want to export.

For example, if you want to export Function_Reference page only, you will need to enter Function_Reference on the big box. To export multiple pages, you have to enter only one page name per line.

But what if you want to export all the functions and not just the function_reference page? Then, you need to enter Functions in the category box and then click on the add button.

You can get a list of available pages by going here : http://codex.wordpress.org/Special:AllPages. Add every page that you want exported.

Finally, click on Export and Codex will generate an XML file containing all the content.

Now, you can import the XML file into your local MediaWiki installation and use Codex in offline mode. You can find the detailed guide on importing an XML file here. (See : Upload Import)

HTTrack Website Copier

HTTrack Website Copier downloads all the pages of a website and saves it locally on your computer so that you can view it later without having to connect to internet. It will, however, take a longer time than using MediaWiki because it downloads the whole website. There’s two way you can use it, firstly, you can download the whole WordPress.org site which will take a lot of time since all the themes and plugins will also get downloaded. You cannot just download codex.wordpress.org with HTTrack since the Htaccess file seems to disallow it.

The other way is to use HTTrack to download http://phpdoc.wordpress.org/trunk/ only. The link does not have the same layout, search and sample documentation found in the codex, though.


Which method do you like? Also, let us know by commenting below if you know any other methods than those mentioned here.