Posted on by & filed under Content - Highlights and Reviews, Mobile Development.

In my Introducing Adobe Shadow post I walked you through some good tips for using the product. In this tip I will show you how to test your local content in WordPress with the help of Shadow.

If you’re developing using a locally hosted instance of WordPress (for example, using MAMP or something similar) you may be having issues testing your local content with Shadow. Specifically, if you just go to the IP address shown in the extension, your pages may not render correctly on your devices. If this is the case, the odds are WordPress is writing out references to CSS using absolute links based off an entry in your configuration. This is a pretty easy thing to fix.

First, go into the WordPress Dashboard, and on the bottom left side go into the General Settings:

On the General Settings page, look for an entry called WordPress Address.

If that says “http://localhost” then try changing that to the same IP address shown at the bottom of the popup for the extension.

Save the setting change, and try browsing your content again. You should see your content being rendered on your devices appropriately.

Be aware: if your IP address changes later, you may have difficulty getting back in to your WordPress Dashboard. If you do get totally locked out, and you can’t change your machine IP back to what you put in to WordPress, you can fix the values by hand.

In your WordPress database, look for the values with option_name = “home” and option_name = “siteurl”:

Update these values back to http://localhost and you’ll be unstuck.

Note – this should really be your last resort. You’re mucking about in the WordPress database by hand. You can break stuff in there without meaning to, so be sure you know what you’re doing. You’ll be better off editing these individual fields using phpmyadmin rather than running command line SQL, especially if this isn’t something you do all the time. Please don’t yell at me if you break it. No warranty on this advice, void where prohibited, offer not valid in Utah, etc.

In the interim, we’re looking at ways to make things like locally hosted WordPress installs easier to test with Adobe Shadow. While we’re at it, this should be useful to get you past this issue if you’re blocked.

Legal Disclaimer: The postings on this site are my own and don’t necessarily represent the position, views or opinions of Adobe.

Safari Books Online has the content you need

Check out these JavaScript books available from Safari Books Online:

In Effective JavaScript: 30 Specific Ways to Harness the Power of JavaScript (Rough Cut), long-time JavaScript standards committee insider David Herman introduces 30 powerful ways to write more efficient and more robust software with the latest version of JavaScript.
In JavaScript: The Good Parts, Crockford finally digs through the steaming pile of good intentions and blunders to give you a detailed look at all the genuinely elegant parts of JavaScript.
JavaScript Testing shows you the most essential features of JavaScript, which you will be using in your daily development, testing, and debugging tasks. You will learn to use the most basic functions of JavaScript to perform ad hoc testing quickly and efficiently.

About the Author

  Duane O’Brien is a tired computer scientist. He has written a number of articles on developing web applications and various PHP frameworks. To learn more about Duane, check out his blog or read his tweets.

Tags: Adobe Shadow, IP Address, locally hosted, WordPress,

Comments are closed.