Skip to content


See Laravel's routing documentation to better understand how routing works in Acorn

Acorn allows you to use Laravel's routing functionality on your WordPress sites, and will automatically handle Laravel routes defined in the routes/web.php file if it exists.

Routes are an easier way to implement virtual pages in WordPress.

Since registered routes are dynamic, WordPress is not aware of how to handle some functionality such as setting the canonical URL, setting the <title>, and adding SEO-related meta data. Make sure to take this into consideration when adding routes to your site.

# Basic routing example

# Create the route file

Create routes/web.php with the following:


use Illuminate\Support\Facades\Route;

| Web Routes
| Here is where you can register web routes for your application.

Route::get('/welcome/', function () {
    return view('welcome');

# Create the view file

Create resources/views/welcome.blade.php with the following:




Last updated

Support Roots

Help us continue to build and maintain our open source projects. We’re a small team of independent developers and every little bit helps.

Sponsor Roots on GitHub

Digging Deeper