Skip to content

Commit

Permalink
new index, gettign started, patreon
Browse files Browse the repository at this point in the history
  • Loading branch information
bfistein committed Sep 15, 2024
1 parent 31cc64a commit bcf57dd
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 45 deletions.
84 changes: 84 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
title: Getting Started
---
To get started with a basic WpDotNet app, follow this tutorial.

## Prerequisites

- .NET SDK 6.0, or newer. ([dotnet.microsoft.com](https://dotnet.microsoft.com/download))
- MySQL Server ([dev.mysql.com](https://dev.mysql.com/downloads/mysql/) or [docker](https://hub.docker.com/_/mysql))

Make sure you have valid credentials to your MySQL server and you have created a database in it. The following quick start expects a database named `"wordpress"`. Database charset `"UTF-8"` is recommended.

## Quick Start

Open or create an ASP NET Core application, version 6.0 or newer.

```shell
dotnet new web
```

Add a package reference to [`"Peachpied.WordPress.AspNetCore"`](https://www.nuget.org/packages/PeachPied.WordPress.AspNetCore/) (note it is a **pre-release** package):

```shell
dotnet add package PeachPied.WordPress.AspNetCore --version 6.5.4-rc-020
```
!!! tip "Always have access to the latest build!"
If you want the absolute latest release build with the most recent implementations and bug fixes, please consider becoming a [Patron](patron.md) for this and many other benefits.


Add the WordPress services and set up your database connection (here or in `appsettings.json`):

```C#
builder.Services.AddWordPress(options =>
{
options.DbHost = "localhost";
options.DbName = "wordpress";
// ...
});
```

> Note: the recommended approach is to place the configuration within the `appsettings.json` configuration file. See [configuration](configuration.md) for more details.
Add the WordPress middleware within your request pipeline:

```C#
// ...
app.UseWordPress();
// ...
```

## Sample App

The sources of a demo WordPress application are available at [github.com/iolevel/peachpie-wordpress](https://github.com/iolevel/peachpie-wordpress).

## Dashboard

Besides regular WordPress dashboard pages, WpDotNet adds an informational panel on the Dashboard Home page, within the *At a Glance* widget.

![WpDotNet At Glance](img/wp-dashboard-glance.png)

The panel provides information about the current .NET runtime version, consumed memory, or total CPU time spent in the whole application. Note that the values are reset if the process is restarted.

## Differences

The main differences between regular WordPress running on PHP and WpDotNet running on .NET are:

- The .NET application and all its [plugins/themes](plugins-php.md) need to be compiled before running. Plugins and themes cannot be added after building the project.
- The WordPress configuration is not set in `wp-config.php` file anymore. WpDotNet uses ASP.NET Core configuration providers like `appsettings.json`. See [configuration](configuration.md).
- There is literally no `php` intepreter; all the PHP standard functions and extensions are re-implemented in .NET and their behavior may differ, i.e. break some functionality. In such case please let us know.

## Notes

- Permalinks are implicitly enabled through the URL rewriting feature.
- WordPress debugging is implicitly enabled when running in a *Development* environment (debugging in your IDE).
- When running on Azure Web App with _MySql in App_ enabled, the database connection is automatically configured.
- Response caching and response compression are enabled by default when the user is not logged in.
- Most of the original `.php` files are not present on the file system and cannot be edited.

## Next Steps

- [Tutorial: Build ASP.NET Core app with WordPress](tutorials/aspnetcore-wordpress.md): Step-by-step creating WordPress app in Visual Studio.
- [Add WordPress Plugins/Themes](plugins-php.md): Extend WpDotNet with WordPress/PHP plugins and themes from `.php` sources.
- [Public NuGet Release](https://www.nuget.org/packages/PeachPied.WordPress.AspNetCore/): Free WpDotNet release versions.

Binary file added docs/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 43 additions & 45 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,68 @@ social:

# Overview

<div align="center">
<img src="img/logo.png" width="150">
</div>

[WpDotNet](https://www.wpdotnet.com/) is the unmodified WordPress, running compiled purely on .NET, provided as a NuGet package & ready to be used as a part of an ASP NET Core application. WpDotNet comes with additional components and features, making it easy to be used from C# and a .NET development environment in general.

The project does not require PHP to be installed, and is purely built on top of the .NET platform.

## Prerequisites
## Features and Use Cases
<div class="grid cards" markdown>

- :material-clock-fast:{ .lg .middle } __Improved Performance__

---

Compiled code is fast and also optimized by the .NET 'JITter' for your actual system. Additionally, the .NET performance profiler may be used to resolve bottlenecks.

- :material-vector-combine:{ .lg .middle } __Integrated with .NET__

- .NET SDK 6.0, or newer. ([dotnet.microsoft.com](https://dotnet.microsoft.com/download))
- MySQL Server ([dev.mysql.com](https://dev.mysql.com/downloads/mysql/) or [docker](https://hub.docker.com/_/mysql))
---

Make sure you have valid credentials to your MySQL server and you have created a database in it. The following quick start expects a database named `"wordpress"`. Database charset `"UTF-8"` is recommended.
Integrate WordPress into a C# app, and drive its life cycle within the Kestrel Web Server.

## Quick Start
- :material-google-circles-extended:{ .lg .middle } __Extensible by C#__

Open or create an ASP NET Core application, version 6.0 or newer.
---

```shell
dotnet new web
```
Implement plugins in a separate C# project or have your WP plugins use .NET libraries with type safe and compiled code, optimized and checked for each platform.

Add a package reference to [`"Peachpied.WordPress.AspNetCore"`](https://www.nuget.org/packages/PeachPied.WordPress.AspNetCore/) (note it is a **pre-release** package):
- :material-code-block-braces:{ .lg .middle } __Distributed Without Sources__

```shell
dotnet add package PeachPied.WordPress.AspNetCore --version 6.5.4-rc-020
```
---

Add the WordPress services and set up your database connection (here or in `appsettings.json`):
After the compilation, most of the source files are not needed. Some files contain meta-data (like plugins and themes) and should be kept in the output.

```C#
builder.Services.AddWordPress(options =>
{
options.DbHost = "localhost";
options.DbName = "wordpress";
// ...
});
```
</div>

> Note: the recommended approach is to place the configuration within the `appsettings.json` configuration file. See [configuration](configuration.md) for more details.
## Patreon
The WpDotNet project is free and open source, and you can always build it from its sources (check out [how to get started](getting-started.md)). However, you can unlock a ton of additional value by becoming [a patron on Patreon](https://www.patreon.com/pchpcompiler). We have two tiers that give you a number of benefits on top of what the open source community gets:

Add the WordPress middleware within your request pipeline:
=== "Poweruser"

```C#
// ...
app.UseWordPress();
// ...
```
* Dedicated, private Discord channel
* Blogs & Video Tutorials
* Issue resolution
* Nightly builds
* Release builds
* Access to private NuGet feeds
* Shout-outs at the end of blogs & videos

## Sample App
=== "Superfan"

The sources of a demo WordPress application are available at [github.com/iolevel/peachpie-wordpress](https://github.com/iolevel/peachpie-wordpress).
* Everything in the Poweruser tier, plus:
* Priority issue resolution
* Private continuous testing
* Listed as sponsor on our homepage
* On demand video lessons & tutorials
* Dedicated, private Discord channel only for Superfans

## Dashboard

Besides regular WordPress dashboard pages, WpDotNet adds an informational panel on the Dashboard Home page, within the *At a Glance* widget.
Once you deploy WpDotNet, you'll get an informational panel on the Dashboard Home page, within the *At a Glance* widget.

![WpDotNet At Glance](img/wp-dashboard-glance.png)

Expand All @@ -73,20 +82,9 @@ The main differences between regular WordPress running on PHP and WpDotNet runni
- The WordPress configuration is not set in `wp-config.php` file anymore. WpDotNet uses ASP.NET Core configuration providers like `appsettings.json`. See [configuration](configuration.md).
- There is literally no `php` intepreter; all the PHP standard functions and extensions are re-implemented in .NET and their behavior may differ, i.e. break some functionality. In such case please let us know.

## Notes

- Permalinks are implicitly enabled through the URL rewriting feature.
- WordPress debugging is implicitly enabled when running in a *Development* environment (debugging in your IDE).
- When running on Azure Web App with _MySql in App_ enabled, the database connection is automatically configured.
- Response caching and response compression are enabled by default when user is not logged in.
- Most of the original `.php` files are not present on the file system and cannot be edited.

## Next Steps

- [Get Started](getting-started.md): See a quick tutorial that will get you started with WpDotNet.
- [Tutorial: Build ASP.NET Core app with WordPress](tutorials/aspnetcore-wordpress.md): Step-by-step creating WordPress app in Visual Studio.
- [Add WordPress Plugins/Themes](plugins-php.md): Extend WpDotNet with WordPress/PHP plugins and themes from `.php` sources.
- [Public NuGet Release](https://www.nuget.org/packages/PeachPied.WordPress.AspNetCore/): Free WpDotNet release versions.

---

[![NuGet](https://img.shields.io/nuget/v/PeachPied.WordPress.AspNetCore.svg)](https://www.nuget.org/packages/PeachPied.WordPress.AspNetCore/)
- [Public NuGet Release](https://www.nuget.org/packages/PeachPied.WordPress.AspNetCore/): Free WpDotNet release versions.
20 changes: 20 additions & 0 deletions docs/patreon.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,23 @@
title: Patreon
---

The WpDotNet project is free and open source, and you can always build it from its sources (check out [how to get started](getting-started.md)). However, you can unlock a ton of additional value by becoming [a patron on Patreon](https://www.patreon.com/pchpcompiler). We have two tiers that give you a number of benefits on top of what the open source community gets:

=== "Poweruser"

* Dedicated, private Discord channel
* Blogs & Video Tutorials
* Issue resolution
* Nightly builds
* Release builds
* Access to private NuGet feeds
* Shout-outs at the end of blogs & videos

=== "Superfan"

* Everything in the Poweruser tier, plus:
* Priority issue resolution
* Private continuous testing
* Listed as sponsor on our homepage
* On demand video lessons & tutorials
* Dedicated, private Discord channel only for Superfans

0 comments on commit bcf57dd

Please sign in to comment.