How to use VersionPress to clone across servers? - wordpress

I would like to clone a WordPress site that is already in VersionPress to a new server.
The instructions are generally only listed for cloning on the current server. I have one server dedicated to Dev and another for Production
I tried the following command line:
wp vp clone
--name=sitename
--ssh=username#site.school.edu
--path=/var/www/html/folder
--url=https://site.school.edu/destination
--dbname=mydb
--dbuser=myuser
--dbpass=mypass
--dbhost=xxx.xxx.xxx.xxx
--dbprefix=wp-
--force
However after I login to the remote ssh server, I get this error:
Fatal error: Call to undefined function apply_filters() in /var/www/html/atwiki/wp-includes/load.php on line 317
Error: Cannot connect over SSH using provided configuration.
Any ideas?

Here's a blog post on how to achieve that today. We will have a more polished way in the future.

Related

"Unknown "link_attributes" filter."

So I'm trying to setup a local environment with ddev for the first time. I got it running, cloned my live files with git and imported my DB.
Site ain't working and got this in the log :
Uncaught PHP Exception Twig\Error\SyntaxError: "Unknown
"link_attributes" filter." at
/var/www/html/web/themes/customs/myTheme/templates/menu--main.html.twig
Any pointer how to fix that ? I did :
ddev exec drush en link_attributes
Which outputs
[notice] Already enabled: link_attributes
I just found out that it's from the module twig_link_attributes, not link_attributes... When I saw the error and scrolled through the module list, I looked into link_attributes to make sure it was downloaded and enabled. It's the wrong one.
My twig_link_attributes folder is empty cause it's a git submodule and it didn't download. Gonna fix that and I should be good. Damn filter named the same as another module D:

aodh-api service not getting installed after devstack installation

I'm trying to install aodh. I am following this tutorial - https://docs.openstack.org/aodh/stein/install/install-ubuntu.html
When I run this command
aodh alarm list
I'm getting following error.
<html>
<head>
<title>503 Service Unavailable</title>
</head>
<body>
<h1>503 Service Unavailable</h1>
The server is currently unavailable. Please try again at a later time.<br /><br />
The Keystone service is temporarily unavailable.
</body>
</html> (HTTP 503) (Request-ID: req-9f8035a5-e324-4e2f-b3f0-037b68f88d1a)
Even though the error says keystone is unavailable, I highly suspect that already there was some problem with aodh installation.
From the aodh link above, I in the final step, it says:
Restart the Alarming services:
# service aodh-api restart
# service aodh-evaluator restart
# service aodh-notifier restart
# service aodh-listener restart
When I tried this
service aodh-api restart
I got following error
Failed to restart aodh-api.service: Unit aodh-api.service not found.
Moreover in step 2 of above link
Source the admin credentials to gain access to admin-only CLI commands:
$ . admin-openrc
Since, I was unable to find admin-openrc, I skipped that step.
So, I am thinking probably aodh installation didn't go well. Hence the aforementioned error in 'aodh alarm list' command.
Other commands like 'nova list' etc are running fine
Can someone please help in figuring out, what could be going wrong?
Install aodh component as plugin during devstack installation.
https://ask.openstack.org/en/question/116895/how-to-configure-devstack-with-ceilometer-gnocchi-and-aodh-components/
Recently, I encountered this problem, which has been answered on the official website.
https://docs.openstack.org/aodh/latest/contributor/install/index.html
Default, API is provided by apache2 wsgi.
But in my environment, this method can not successfully.
Another method, remove aodh apache2 wsgi, and create aodh-api service.
this method success.

EPERM: operation not permitted, unlink C:\Users

I am using Meteor 1.4.3.2 on a windows7 dev environment.
A Meteor application I have developed has been great for 6+ months but I have caused a problem by removing modules and apparently something I should not have.
Something outside the application folders (sym-link pointing into \AppData\Local.meteor.. somewhere) is missing/wrong, I think.
All other projects are fine, except this one.
All of my backup copies for this project are failing now too, including fresh clone from repo.
No 'meteor' commands will in this project, or it's backup copies, so 'meteor reset' is not an option.
The error is:
C:\Users\muser\iNotice>meteor
C:\Users\muser\AppData\Local\.meteor\packages\meteor-tool\1.4.3_2\mt-os.windows.
x86_32\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:190
throw error;
^
Error: EPERM: operation not permitted, unlink 'C:\Users\muser\iNotice\.meteor\lo
cal\dev_bundle'
at Error (native)
at Object.fs.unlinkSync (fs.js:932:18)
at exports.makeLink (C:\tools\cli\dev-bundle-links.js:20:8)
at [object Object]._.extend.ensureDevBundleLink (C:\tools\project-context.js
:1476:7)
at [object Object]._.extend._readFile (C:\tools\project-context.js:1410:10)
at new exports.ReleaseFile (C:\tools\project-context.js:1360:8)
at C:\tools\cli\main.js:898:22
Any suggestions on best approach to fix the application?
Thanks very much for your time and expertise.
Pick one of the following:
You can delete the content of your .meteor/local folder (repopulated next time you run > meteor)
Or call meteor as an admin
Or remove the read-only access on the dev_bundle folder (but Windows sets it back to read-only from time to time)
Thanks #n3squik!
Here are the actions I took which fixed my problem.
Remove folders:
C:\Users\muser\testApp\.meteor\local\dev_bundle*\*
C:\Users\muser\AppData\Local\.meteor\packages\meteor-tool\1.4.0-1\*
Ran:
C:\Users\muser\testApp> meteor run
The application started up and all seems good.
Thanks again Stack.

Failure installing sbt: "Server access Error: java.security.cert.CertificateException:"

When I try to install error messages, it fails to download. I get error messages like this:
[error] Server access Error: java.security.cert.CertificateException: No subject alternative DNS name matching repo.scala-sbt.org found. url=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-pgp/scala_2.10/sbt_0.13/0.8.3/ivys/ivy.xml
I can confirm, when accessing via my browser, that the certificate installed for the domain repo.scala-sbt.org is actually the certificate for repo.typesafe.com, and this seems to be the source of the error. It doesn't appear to be a DNS issue as http://repo.scala-sbt.org/ (insecure) works.
Please see https://github.com/sbt/sbt/issues/2125 for the workarounds. Specifically "http" should not be used.
resolvers += Resolver.url("fix-sbt-plugin-releases", url("https://dl.bintray.com/sbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)
Edit: This issue is now resolved. No workarounds should be required.
As a temporary workaround, add the file ~/.sbt/0.13/plugins/temp.sbt with the following contents:
resolvers += Resolver.url("fix-sbt-plugin-releases", url("https://dl.bintray.com/sbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)
You'll still see the error, but sbt will be able to find the dependency for which it is searching when accessing https://dl.bintray.com/sbt/sbt-plugin-releases directly (the place to which repo.scala-sbt.org presently redirects).
Upgrading nss package on CentOS worked for me.
sudo yum upgrade nss

Symfony production environment throws 500 error: Doctrine\ORM\ORMException 'Unknown Entity namespace alias 'DSBlogBundle'

I'm learning Symfony2, really cool stuff. But I do run into some trouble when I want to try and visit the production environment. I have followed the Symblog Tutorial that is located here: http://tutorial.symblog.co.uk/
I have cleared the cache and I visit http://symfony.dev/ I have running locally. The page remains totally blank and this error is in the log:
Fatal error: Uncaught exception 'Doctrine\ORM\ORMException' with message 'Unknown Entity namespace alias 'DSBlogBundle'.'
in /Applications/MAMP/htdocs/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php:236
Stack trace:
#0 /Applications/MAMP/htdocs/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php(194): Doctrine\ORM\ORMException::unknownEntityNamespace('DSBlogBundle')
#1 /Applications/MAMP/htdocs/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(554): Doctrine\ORM\Configuration->getEntityNamespace('DSBlogBundle')
#2 /Applications/MAMP/htdocs/symfony/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(194): Doctrine\ORM\Mapping\ClassMetadataFactory->getFqcnFromAlias('DSBlogBundle', 'Blog')
#3 /Applications/MAMP/htdocs/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(295): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getMetadataFor('DSBlogBundle:Bl...')
#4 /Applications/MAMP/htdocs/symfony/vendor in /Applications/MAMP/htdocs/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php on line 236
What I don't get is that the 'Unknown Entity namespace alias 'DSBlogBundle' is perfectly "known" in the development environment. Does anyone know what I am missing? Any help is much appreciated! Thank you!
Couple possibilities I can think of:
1) If your code functions properly in the development environment, then it could be a cache problem and/or a permissions problem. Make sure your files are readable by the user/process associated with your web server and make sure the prod cache directory is writable by that user so it can generate the necessary files. What I generally do is run the clear cache console command AS that user to avoid unexpected cache problems, like this (on linux):
sudo -u www-user php app/console cache:clear --env=prod
If you're developing on linux, you must be logged in as either root or another user with administrator privileges to run a command as a user other than yourself.
2) You may have configurations defined in the dev environment that don't exist in the prod environment. Double check the files in your app/config folder. My first guess would have been that the DSBlogBundle wasn't correctly defined in app/AppKernel.php but I believe that's environment independent so it couldn't work in dev but not prod.

Resources