These instructions are temporarily broken because I am no longer hosting the cities.txt file. Do not use this page, for now. I will update this very soon with a working method. My apologies.
These steps will show you how to install the atlas in a separate database rather than in the WordPress database. This guide is for users who feel comfortable editing PHP files.
Why would you want the atlas in a separate database?
You may want to keep your WordPress database small in order to keep backups small. For example, if you make regular backups of your WordPress database, you do not want those to be massively increased in size by the 345 MB atlas.
Installing The Atlas
- First, create a new database in your hosting account. You would do this the same way you initially created a database for WordPress. Your hosting account should have an easy way for you to do this. For example, look around your hosting panel for “MySQL Databases” or “Create a New Database.” You can name the database any name.
- Write down the database information since you’ll need it below:
- database name
- database user’s username
- database user’s password
- database host
- Next, you will install the atlas into your new database. I have created a tool to do this for you. The tool is called ZodiacPress Custom Atlas Installer. Download the tool: Download atlas-installer v1.3
- Unzip the file you just downloaded. Inside, you will find a folder named installatlas.
- Inside the installatlas folder, you must edit the file named helper-db.php. To edit it, open it with any text editor such as Notepad or TextEdit.
- In the helper-db.php file, edit lines 13-16, which look like this:
For each line, add your database information inside the single quotes. This is the information you wrote down when you created the database above. Then, save and close the file.
- Upload the installatlas folder to your site’s root HTML directory.
- In your web browser, go to:
yoursite.comto your own domain. You should see the atlas installer, which looks like this:
- On the Atlas Installer page, click the Download Data File button to complete step 2. This will copy the cities.txt file to a temporary directory on your server. This can take several minutes to complete. When it is complete, move on to the next step.
- On the Atlas Installer page, click the Install Atlas button to complete step 3. This will insert all of the city records from the cities.txt file into your database. This can take up to 5 minutes (more or less, depending on your server). You will be notified when it is finished like this:
- When the Atlas Installer is complete, you can remove or delete the installatlas folder from your site’s root HTML directory.
- Now that your atlas is installed in your separate database, you have to tell ZodiacPress to use it. Because by default, ZodiacPress will look for the atlas inside the WordPress database. To tell ZodiacPress to use your separate atlas database, you have to add this bit of PHP code to your WordPress functions:
}, 0 );
, 0 );(See how to add code to your WordPress site.)
You must only edit line 3. Replace
database_hostwith your own database details.
NOTE: If your separate database has the same database user, user password, and database host as your WordPress database, you can use the predefined constants from wp-config.php to avoid hardcoding this information. In this case, line 3 would become:
wpdb( DB_USER, DB_PASSWORD,
, DB_HOST );
…and you would only replace
database_namewith the name of your separate database. The other constants on that line would remain as is.
- Your atlas is now completely installed. To make sure everything is working properly, go to your WordPress dashboard > ZodiacPress > Settings, and click the Misc tab. In the Atlas Status box, the “Status” row should say Active like in this image: