How-To: Setup Private WebPageTest
Instance
Install the WPT Web Server
Manual Install
1. Clone https://github.com/WPO-Foundation/webpagetest
2. Copy the www folder inside to your default web server document directory.
3. Modify web server configurations to ensure that the www folder is accessible via
http://localhost/. This page should look like the webpage test portal where you can specify web
url and other settings to load the page.
4. Open http://localhost/install/ and install the missing (non-optional) dependencies mentioned
on the page.
5. cd into “www/settings/” folder and copy all *.ini.sample files to *.ini files. The important ones
are locations.ini, connectivity.ini, and settings.ini. You can refer to
https://www.utkarshgoel.in/WPT/locations.ini,
https://www.utkarshgoel.in/WPT/connectivity.ini, and
https://www.utkarshgoel.in/WPT/settings.ini files to prepare your own.
Or, No-hassle Install
To Configure WPT on an out-of-the-box Ubuntu, for example an AWS EC2 Ubuntu instance, download
the WPT quick installation shell script, make it executable, and run it. The script will install (all) the
dependencies needed for a private WPT instance. Once the script finishes, check the /install path on the
web server to ensure all dependencies are installed.
Notes
For OSX 10.11, make sure you install python Pillow==5.0.0
For OSX 10.11, make sure you run curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5 to enable
FreeType support for GD
If the video does not get produced, make sure www/video/render.php has correct path to ffmpeg. In my
case, it was supposed to be /usr/local/bin/ffmpeg
Setup the WPT Agent
1. Clone https://github.com/WPO-Foundation/wptagent. We will be running the wptagent.py file,
so make sure you have python 2.7 installed already.
2. Cd into wptagent folder
Start the Laptop agent
1. Assuming you have Chrome installed on your laptop, run the command below to start the agent:
$> sudo python wptagent.py --server "http://localhost/work/" --laptop --location laptop_wpt This command will start the agent and once started, it will print “Running agent, hit Ctrl+C to
exit”
2. Visit http://localhost and you should see “laptop” populated in the test location field and
“chrome” populated in the browser field. Use the interface as you would use the live
webpagetest website. You can also check http://localhost/install/ to see that it shows that one
agent (laptop) is connected.
Start the Android Agent
1. Plug in the android device to the laptop with USB debugging turned on.
2. Make sure the device shows up when you run
$> adb devices
3. Now, to run the WPT agent, run the command below
$> sudo python wptagent.py --server "http://localhost/work/" --android --location android wpt
You can also check http://localhost/install/ to see that it shows that one agent (android) is
connected. Make sure the android device is connected to the Internet, has at least 50% battery
charge and the device temperature is below 36C.
Notes
If you get the following error, this means that you need to kill the parent of the pid=30451
psutil.ZombieProcess: psutil.ZombieProcess process still exists but it's a zombie (pid=30451)
Run the command below to get the parent process ID
$> ps -o ppid= -p
How-To Setup Private WebPageTest Instance
of 2
Report
Tell us what’s wrong with it:
Thanks, got it!
We will moderate it soon!
Struggling with your assignment and deadlines?
Let EduBirdie's experts assist you 24/7! Simply submit a form and tell us what you need help with.