• Gå direkte til primær navigation
  • Skip til indhold
  • Gå direkte til primær sidebar

Vayu Robins

WordPress theme & plugin developer

  • Kompetencer/Services
  • Om/About
  • Kontakt/Contact

Access and test local WordPress site from smartphone/tablet with MAMP

7. september 2013 by Vayu Robins Skriv kommentar

During production of a website, there probably will come a time when you would want to test your site on a smartphone and a tablet.  However, having to upload your site to the hosted server first just to check this is not ideal. You don’t have to do this and you can actually access your site quite easily from your local development site in the MAMP environment in just a few simple steps.

These instructions only work on a mac, with MAMP installed and a wifi internet connection.

1. First, if you haven’t already, you need to fire up your MAMP application.

2. Then you should open you System Preferences and go to the Network settings page.  There you should be able to see the Wi-fi IP address.

wifi network ip address

3. Then you’ll want to add these two lines of php into your wp-config file. You can access your site without doing this step, but the site will load without styles, as the the http://localhost path will not be recognized on you phone/tablet.

define('WP_SITEURL','http://192.168.1.6/');
define('WP_HOME','http://192.168.1.6/');

4. Open up your phone/tablet browser and insert the IP address and you should be able to check your site. Depending on your MAMP setup, you might have to add the Apache port after the IP address like this. 192.168.1.6:8888.

mamp apache port

Happy coding! 🙂

PS. Remember when your done testing, remove those to lines of code from your wp-config.php file.

Del:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn

Like this:

Like Loading...

Skrevet i: WordPress

Læserinteraktioner

Skriv et svar Annuller svar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primær Sidebar

Vayu

Vayu

I am a webdeveloper from Denmark. I make my living building WordPress websites, e-commece sites, custom themes, plugins and widgets.

Verified Services

View Full Profile →

Kategorier

  • Ikke kategoriseret
  • Kode
  • Plugin
  • WordPress
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

  • vayu.dk
  • Frederikssundsvej 49
  • 2400 København NV
  • +45 61 77 00 33
  • info@vrweb.dk

%d