As you already knew we need to run a few fixes on the db to get wordpress loading from our local domain. For my migrations i use the wonderful WP Migrate DB Pro (you can also do it by yourself as written here), but while it fixed almost everything for me one damn thing was left unchanged. Basically, my theme was still trying to load fonts and images from the production server and so failing because of CORS an Access Control Allow Origin error.
After a few text search in my db I discovered that inside the table wp_options a wp_less_cached_files record with the cached less file!!
So the fix was very simple and quick by just issuing the following delete statement.
DELETE FROM wp_options WHERE option_name='wp_less_cached_files'
And voila! If you reload your page it should now be loading your resources from your local setup.]]>
With the news that GitHub will allow us to have private repos, i have moved all of my new stuff over it.
Because i enjoy the ui and it’s simplicity, and the fact you have to add only a README to welcome your users is simple and nice.
I find myself doing a lot of POC and while adding/creating new repos both on my local machine and on github is trivial; it is time consuming and annoying if after a day of work you want to push your code in a safe place and go home.
Also you have to setup some .gitignore, .gitattributes and .editorconfig, so it’s more stuff to do for each repo.
Therefore, I have created NukedBit.NRepo a simple .NET Core Global Tool, that with an interactive console ui, it will help you get your repository configured and ready to push in matter of seconds.
It only support C# repositories, but I will look soon on how to add support for multiple languages, maybe with some external templates, and with custom local ones you can define.
Also at the moment it will only allow you to create public repositories on github, but in the next few days i will be adding an option for making the repository private.
Beware it’s a new tool and i do not take any responsibility over your data, so be safe and create a local backup of your data.
To install just use the following command.
dotnet tool install --global NukedBit.NRepo --version 0.1.0
If you want to enable the remote creation of the github repository you need to setup the environment variable NREPO_GITHUB_TOKEN with your github token you can follow this guide on how to create one, you just need to select the repo permission and it’s children’s setting https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line
You can either run with –n:myawesomerepo to create a repository inside a new folder myawesomerepo or with no value with just –n and it will create it in the current folder, but it will ask for confirmation.
The configuration is done in a few steps:
I have in mind a few improvements, like enabling the creation of private repositories and providing templates for other projects type, like Angular, ReactJS etc..
Please give it a try and if you liked it, share it or leave a comment at the bottom of this article. If you find any issue or have a suggestion please send it over github.]]>