How to Screenshot a Web Page Behind a WordPress Password Prompt
Enter the page password, wait for the protected content to load, then capture the viewport, full page, or a specific element.
To screenshot a password-protected WordPress page, open its URL, enter the password provided by the site owner, submit the form, and wait for the protected content to render. Then capture the visible viewport, the full scrollable page, or a specific element. This workflow requires authorized access; it does not bypass the password.
1. Confirm you have the right access
WordPress password-protected content shows a password form in place of the post until the correct password is entered. Its default prompt says, “This post is password protected. To view it please enter your password below:” WordPress.org explains password-protected posts.
A WordPress private page is a different visibility setting: access is limited to qualifying site users. If a password prompt is absent, the supplied password is rejected, or the page says you lack permission, ask the owner for the appropriate account or access. Do not try to work around the restriction. WordPress visibility documentation describes the distinction.
2. Enter the password and wait for the page
- Open the page URL in a browser where you are authorized to view it.
- Enter the password supplied by the site owner and submit the form.
- Wait until the protected content appears. If the page is still loading, wait for images and other important content too.
- Check that the address and page are the expected ones before capturing.
WordPress stores the post password in a browser cookie, so you may not be asked again on a later visit in the same browser. If the form returns, check that the password is correct and that cookies are enabled. The cookie does not make the page’s associated media private: WordPress.com notes that images and other media attached to protected content may still be indexed by search engines. Do not treat the prompt as a guarantee that linked or attached files are secret.
3. Choose what to capture
| Capture | Use it for | What to check |
|---|---|---|
| Viewport | A quick record of what is visible on screen. | Scroll to the intended position and set the browser window to the desired size first. |
| Full page | Long-form content that extends below the fold. | Confirm the capture tool supports full-page screenshots and that lazy-loaded sections have appeared. |
| Element | One article, chart, or other selected region. | Use a tool that supports element capture and select the correct region. |
For a manual capture, use your operating system’s screenshot function after the page is ready. Browser and operating-system shortcuts vary, so consult the relevant browser or operating-system help if needed. For repeatable automation, Playwright documents viewport, full-page, and element screenshots in its screenshot guide.
4. Capture it with Playwright
The following runnable Node.js example uses Playwright. It opens the password form, submits the password from an environment variable, waits for a page-specific selector, and saves a full-page PNG. Replace the URL, form selectors, and content selector with those used by the site. Keep the password out of source control.
import { chromium } from 'playwright';
const url = process.env.PAGE_URL;
const password = process.env.WP_PAGE_PASSWORD;
if (!url || !password) {
throw new Error('Set PAGE_URL and WP_PAGE_PASSWORD');
}
const browser = await chromium.launch();
try {
const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60000 });
// Adjust these selectors to match the site's password form.
await page.locator('input[type="password"]').fill(password);
await page.locator('input[type="submit"], button[type="submit"]').first().click();
// Replace with a selector that only appears in the unlocked content.
await page.locator('article').waitFor({ state: 'visible', timeout: 30000 });
await page.screenshot({ path: 'wordpress-page.png', fullPage: true });
} finally {
await browser.close();
}
Install Playwright in a Node project with npm install playwright, then install a browser with npx playwright install chromium. Run the script with PAGE_URL and WP_PAGE_PASSWORD set in the environment. For a viewport-only image, omit fullPage: true. For an element capture, call screenshot on a locator, for example await page.locator('article').screenshot({ path: 'article.png' }). Playwright’s guide covers output type and scale options as well as capture scope.
5. Check the saved image
- Open the file and verify the protected content, rather than the password form, is visible.
- For a full-page shot, inspect the bottom as well as the top for missing sections or cut-off content.
- For an element shot, confirm the selected region includes the context you need.
- If the page contains sensitive content, store and share the screenshot under the same access expectations as the page.
Or skip the browser setup
ScreenshotNeo is a website screenshot API. A screenshot API fetches a URL itself; it does not inherit your browser’s password cookie or unlock a WordPress prompt. The example below is suitable for a publicly accessible page after you have arranged authorized access. For a protected WordPress page, use the browser and Playwright workflow above unless the site supports an authorized method the capture request can use.
ScreenshotNeo supports custom cookies and headers, but only send credentials when you are authorized and the site’s access method can be represented that way. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', res);
Replace the example target with a URL you are authorized to capture. ScreenshotNeo removes supported cookie and consent banners, newsletter popups, and chat widgets before capture; those cleanup steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server offers screenshot tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.
Troubleshooting
| Problem | Likely cause | What to do |
|---|---|---|
| The password form appears again | The password was incorrect, the form did not submit, or the browser did not retain the cookie. | Verify the password with the owner, submit the form again, and allow cookies for the site. |
| The page says private or access denied | The page uses WordPress private visibility or another access rule. | Ask the owner for an authorized account or permission. |
| Playwright cannot find the password field | The site uses a custom form or selector. | Inspect the authorized page’s form and replace input[type="password"] and the submit selector. |
| The script saves the prompt instead of the page | Submission did not complete, the password was rejected, or the wait selector appears before unlock. | Check the page after submission; wait for a selector unique to protected content and handle visible error messages. |
| The full-page image is incomplete | Content may load on scroll or after scripts run. | Wait for the page’s actual content, scroll through it to trigger lazy loading, then capture; use a viewport capture if full-page mode is unsupported. |
| The image is clipped or has the wrong framing | The viewport dimensions or capture scope do not match the intended result. | Set the viewport before capture, or use full-page or element capture as appropriate. |
Performance, reliability, and cost
A manual screenshot is usually the simplest option for a one-off image. Browser automation adds setup but makes repeated captures consistent. Full-page capture takes more work than a viewport image on long pages, especially when the page loads content as you scroll. Use a meaningful content selector and a bounded timeout so a script can report a failed or slow page instead of silently saving the password form.
Playwright itself is software you run, so account for the machine and browser runtime in your workflow. ScreenshotNeo charges according to its plans and billing rules; its response headers report the verdict and whether a request was billed. The free tier provides 1,000 shots each month without a card, and paid plans start at $5 for 3,000 shots. Yearly billing gives two months free. A capture API still needs a URL it can access; it is not a way to bypass WordPress authorization.
FAQ
Can I screenshot the page without entering its WordPress password?
No. Get the password or another authorized form of access from the page owner, then capture the rendered content.
Will the password work in every browser?
The password cookie is stored by the browser, so a different browser or a cleared cookie may show the form again. Enter the password there if you are authorized.
Does a password-protected page make its images private?
Not necessarily. WordPress.com warns that media attached to protected content may still be indexed. Ask the site owner how those files are protected.


