Package Data | |
---|---|
Maintainer Username: | mopo922 |
Package Create Date: | 2017-06-17 |
Package Last Update: | 2017-06-23 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 15:03:34 |
Package Statistics | |
---|---|
Total Downloads: | 3 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Command line tool to import another blog's posts into Laravel Canvas.
Add this to your project's composer.json
file:
// ...
"require": {
// ...
"mopo922/canvas-importer": "dev-master",
// ...
},
// ...
Add this to the providers
array in config/app.php
:
'providers' => [
// ...
CanvasImporter\CanvasImporterServiceProvider::class,
]
Run composer update
.
After the import is complete, you can remove these lines and run composer update
again if you don't plan on using the importer any more.
Finally, you'll want to make sure config('app.url')
is defined properly in config/app.php
,
otherwise post images won't download or display properly.
When importing a WordPress blog, you'll need to install this Basic Authentication plugin to allow the importer to talk to the WordPress API using your admin username & password:
https://github.com/WP-API/Basic-Auth
IMPORTANT: You should deactivate this plugin as soon as the import is complete, as it is not recommended for production environments.
From your project's root directory, run php artisan canvas:import
. The importer
will take care of the rest, prompting you for the information it needs to complete
the task. Have the URL of your old blog handy, along with the admin username & password.
Pro Tip: If you're using a VM, like Vagrant or Laravel Homestead, make sure you're
on the server, not on the host machine, when running canvas:import
.