Test in WebDonkey
FreeIf WebDonkey is installed on your Mac and running, you test a website locally under an address of its own with PHP. That way you can try out the contact form too before the website goes online. Without WebDonkey only this test is missing; Pages can do everything else on its own.
What you do here
- Local address: set the website up in WebDonkey, start it, open it in the browser and change its address.
- Form test: try out the contact form with PHP; the messages arrive in WebDonkey.
- Remove from WebDonkey: take the local address down again.
- The websites in WebDonkey: your Pages websites on WebDonkey's Sites page.
Layout
- The button: it sits at the top right of the open website's title bar, right before Publish. Before setup it reads Test in WebDonkey. Afterwards it shows the local address with a dot in front: green while the site is running, grey when it is stopped.
- The window: clicking the button opens Test locally in WebDonkey. Clicking outside closes it again.
The button only appears when Pages is connected to WebDonkey, the top right then shows With WebDonkey (With and without WebDonkey), and WebDonkey is running when you open the website. If WebDonkey is too old for the local test, the window says Your WebDonkey does not support local testing yet. Please update WebDonkey.
Free and Premium
The local test needs no Pages licence. WebDonkey's limits apply, for example how many sites with SSL can run at the same time and whether Mailpit may start. They are described in the WebDonkey docs under Free, Premium and limits.
Local address Free
WebDonkey sets your website up under a local address on your Mac, with PHP, just as it will run at your host later. Pages suggests the address; you can adjust it before and after setup. It always shows the latest checked version, just like the preview.
Where to find it
Open the website and click Test in WebDonkey at the top right of the title bar. If the site is already set up, the button shows its address.
How to do it
- Click Test in WebDonkey. Test locally in WebDonkey opens with a short explanation and the Local address field.
- The field holds a suggestion: the domain from the facts with the ending
.pages, for examplebakery-miller.com.pages. If the website has no domain yet, Pages uses the website's folder name, for examplebakery-miller.pages. - Adjust the address if you like.
- Click Set up now.
- If there is no built version yet, Pages builds the website first (Pages is building the website first …). Then WebDonkey sets it up (WebDonkey is setting up the website …).
- The window shows the address with Running. Click Open in browser.
Fields and buttons after setup
| Element | Meaning |
|---|---|
| Address line | The full address with Running or Stopped. |
| Note | Always shows the latest checked version. After a change, simply reload the page in your browser. |
| Local address with Change address | The current address. Change address becomes active as soon as you type a different valid address. |
| Note about the form | Whether messages from the contact form arrive, see Form test. |
| Remove from WebDonkey | Takes the local address down again, see Remove from WebDonkey. |
| Open in browser | Opens the address in your default browser. Only shown while the site is running. |
| Start | Shown instead of Open in browser when the site is stopped, and starts it again. |
Changing the address
- Open the window via the button with the address.
- Type the new address in the Local address field.
- Click Change address.
WebDonkey moves the site to the new address, including web server configuration, certificate and name resolution on your Mac. The button then shows the new address.
Rules for the address
- Allowed are letters without accents, digits, hyphens and dots. Pages turns capitals into lower case.
- The address needs at least two parts with a dot between them. No part may start or end with a hyphen.
- If the input doesn't fit, the field shows Use letters without accents, digits, hyphens and dots, e.g. my-company.pages. and the button stays greyed out.
- If another site in WebDonkey already has the address, it says The site “…” in WebDonkey already uses this address. Choose a different one.
- WebDonkey doesn't accept a bare domain ending such as
co.uk: WebDonkey does not accept this address. A bare domain ending such as co.uk is not enough, put a name in front, e.g. my-company.co.uk.
Which version you see
WebDonkey always shows the latest checked version, the same as the preview in Pages. After a change, simply reload the page in your browser. The "Built with WebDonkey Pages" link that the ZIP export adds in Free is missing here.
HTTPS
WebDonkey sets up the address with HTTPS as long as it has room for one more site with SSL; otherwise it runs over HTTP. How many SSL sites WebDonkey allows at once is in the WebDonkey docs under Free, Premium and limits.
What happens in the background
- Pages asks the running WebDonkey on your Mac to create a site. Nothing goes over the network.
- WebDonkey serves the latest checked version from the website's folder, with PHP. It enters the website's folder as the project folder.
- If the website has a contact form, Pages creates the settings for the form test and starts Mailpit in WebDonkey along with it (Form test).
Older WebDonkey versions
- Your WebDonkey still picks the local address itself. After updating WebDonkey, you can remove the website here and set it up again with your address. Your WebDonkey ignored your address and assigned its own ending in
.test. - Your WebDonkey can’t change the address of a website that’s already set up. Update WebDonkey, or remove the website here and set it up again with the new address.
Troubleshooting
| What you see | What to do |
|---|---|
| The Test in WebDonkey button is missing. | Start WebDonkey and open the website again. Without WebDonkey on this Mac, there is no button. |
| WebDonkey is not running. Start WebDonkey and try again. | Start WebDonkey. |
| Your WebDonkey does not support local testing yet. Please update WebDonkey. | Update WebDonkey. |
| WebDonkey is not responding right now. Please try again in a moment. | Wait a moment and try again. |
| WebDonkey could not set up the website. Check Sites in WebDonkey. | Help is in the WebDonkey docs under Sites. |
| There is no finished version of this website yet. Try again after the next successful build. | Let the website build and check, then try again. |
| This address cannot be opened. after Open in browser | The site runs without HTTPS under an address Pages doesn't open itself. Open it in WebDonkey under Sites. |
See also
Form test Free
The contact form of a Pages website sends via PHP. The preview in Pages runs no PHP; WebDonkey does. That way you try out the form before the website is online. The messages arrive in WebDonkey under Mail, never in a real inbox.
How to do it
- Set up the local address and open it with Open in browser.
- Go to the page with the contact form, fill it in and send it. Wait a few seconds after the page has loaded: the website rejects a form that is sent less than three seconds after loading.
- The form checks your input as it will online: a name (2 to 120 characters), a valid email address, a message of 10 to 5000 characters and consent to the privacy policy.
- Open Mail in WebDonkey. The message to the site owner is there. If you ticked Send me a copy in the form, the copy to the sender is there too (Mail in WebDonkey).
What the window tells you
As soon as the website has a contact form, the Test locally in WebDonkey window tells you where you stand:
| Note | Meaning |
|---|---|
| Messages from the contact form arrive in WebDonkey under “Mail”, not in a real inbox. | Everything is ready. |
| For messages from the contact form to arrive, start Mailpit in WebDonkey under “Mail”. | Mailpit isn't running. Pages tries to start it during setup. If that doesn't work, for example because of a limit in WebDonkey Free, start it there yourself. |
| Pages could not set up the contact form for the local test, so sending it shows an error. | Pages couldn't write the settings for the test into the website's folder. |
What happens in the background
- For the test, Pages creates a settings file of its own in the website's folder,
.pages/.env. It sits exactly one level above the version WebDonkey serves, which is where the form looks for its settings. - The recipient is the Recipient of enquiries under Facts, Contact form (Contact form); without an entry, the email address under Business. The sender is the Website sender if it belongs to the domain, otherwise
noreply@with the local address. - Pages updates the file every time you open the website, also for sites you set up in WebDonkey yourself.
- WebDonkey's PHP hands every mail to Mailpit. Mailpit catches it; nothing goes onto the internet.
Online
Publishing, the ZIP export and the backup never include this test file. For real sending, the form needs recipient and sender on the server:
- With the ZIP export, they are in
.kontaktformular.phpin thewebsitefolder if domain and email address are set under Facts. - When uploading to a server, Pages creates a
.envone level above the web folder.
The host needs PHP and working mail sending for this.
Troubleshooting
| What you see | Why | What to do |
|---|---|---|
| The form shows an error when sending. | Mailpit isn't running, or the test settings are missing. | Look at the note in the Test locally in WebDonkey window and start Mailpit in WebDonkey if needed. |
| The form shows a message about your input. | A required field is missing or too short. | Fill in name, email address and message and tick the consent box. |
| Nothing arrives in Mail. | Mailpit wasn't started when you sent the form. | Start Mailpit and send the form again. |
See also
Remove from WebDonkey Free
If you no longer need the local test, take the website out of WebDonkey again. The local address disappears; your website in Pages stays as it is. You can set it up again at any time.
Where to find it
Click the button with the local address at the top right of the title bar. In the Test locally in WebDonkey window, Remove from WebDonkey sits at the bottom left.
How to do it
- Click the button with the local address in the title bar.
- Click Remove from WebDonkey.
- Pages asks: The local address disappears from WebDonkey. Your website stays as it is. Confirm with Yes, remove or cancel with Cancel.
- The button then reads Test in WebDonkey again.
What happens in the background
WebDonkey deletes its setup of the site: web server configuration, certificate and logs. The website's folder and everything in it stay as they are. On WebDonkey's Sites page, the website then appears under From WebDonkey Pages again and can be set up there or in Pages (The websites in WebDonkey).
If you archive a website in Pages, its local address in WebDonkey stays. Remove it here first if you no longer need it.
Troubleshooting
- WebDonkey is not running. Start WebDonkey and try again.
- WebDonkey is not responding right now. Please try again in a moment.
- If Remove from WebDonkey is greyed out, Pages is setting something up right now. Wait until it is done.
See also
The websites in WebDonkey Free
WebDonkey knows your Pages websites too. On its Sites page, the Pages tab gathers everything that comes from WebDonkey Pages: websites already running locally, and built websites you set up there with one click. From there you also jump back into Pages.
Where to find it
Open the Sites page in WebDonkey and choose the Pages tab at the top. The number next to it counts set-up and not yet set-up Pages websites together.
What the tab shows
- Set-up sites: websites you set up in Pages with Test in WebDonkey or in WebDonkey with Set up locally. They carry the Pages badge (on hover Set up by WebDonkey Pages). Their actions include Open in Pages.
- From WebDonkey Pages: websites already built in Pages but not yet set up in WebDonkey, with the note Built in WebDonkey Pages, not set up here yet. Each row shows the name, the future address and the Open in Pages and Set up locally buttons.
- If there is no Pages website yet, it says No websites from WebDonkey Pages yet. In Pages, “Test in WebDonkey” brings a website here.
Setting up a website in WebDonkey
- Open Sites in WebDonkey and the Pages tab.
- Find the website under From WebDonkey Pages.
- Click Set up locally. WebDonkey sets up the website under
<foldername>.pageswith PHP and starts it.
This matches Test in WebDonkey in Pages, only without choosing the address yourself. You can change the address afterwards in Pages (Local address).
Opening a website in Pages
Click Open in Pages on a website. Pages comes to the front and opens the website. If Pages isn't running yet, it starts first. If Pages isn't installed on this Mac, WebDonkey reports WebDonkey Pages could not be opened. Is the app installed on this Mac?
What happens in the background
- WebDonkey reads the
~/WebDonkey Pagesfolder, where Pages keeps your websites, but never writes to it. - Open in Pages only opens a website that already exists in Pages. Nothing is created, built or published.
- Pages creates the settings for the form test as soon as you open the website in Pages (Form test).