Following Google tutorial to setup WordPress on the App Engine I migrated few of my sites there, but Im struggling with one thing. For that reason or another lets say I need to make access to wp-admin backend through custom domain and without SSL support.
No matter what I put in app.yaml
url: /wp-admin/(.+)
script: wordpress/wp-admin/\1
secure: never
for example, it seems that App Engine always redirects to https when attempting to log in to the backend. Has anybody have an idea how can I setup insecure access via http://www.domain.com/wp-admin/ ?
I encountered the similar problem, have no idea if they are same, but you can try my solution.
The real cause of my problem is not from GAE but the appengine-wordpress-plugin
1, find the php file "wordpress\wp-content\plugins\google-app-engine\modules\core.php"
2, search string “is_production” and comment out the code below:
if( is_production() ) {
/* please comment this two statements
add_filter( 'secure_auth_redirect', '__return_true' );
force_ssl_admin( true );
*/
other code...
}
3, and don't forget set secure:never in app.yaml
Related
Hey I'm integrating an angular 6+ app into a web page created by wordpress.
I have made it that the app is running and everything, but can't seem to solve the issue where when you open a route of the angular app by clicking on a link outside wordpress or pasting the url in the address bar, wordpress says 404.
I have it like so:
http://example.com/angularApp // This url opens fine
angularApp is a page created by WP (I have hosted scripts and styles in there)
When I try to open http://example.com/angularApp/somecustom route Wordpress tells me that there is nothing on that url.
I saw that I need to use some kind of rewriting but could not get a good example. Can you please help me?
I added the rewrite rule into the functions.php file located in the theme folder which made it work.
I have the following code added to the function et_setup_theme():
add_action('init', 'custom_rewrite_basic_angularApp');
function custom_rewrite_basic_icoranker() {
add_rewrite_rule(
'angularAppRoute',
'index.php?page_id=116414',
'top'
);
}
where angularAppRoute is the page route that I have hosted my angular app into.
http://example.com/angularAppRoute
Hope this helps someone else as well.
I'm having trouble getting my Wordpress multi-site installation working the way I want it. I have 3 blogs that I want working in subdomains, and I want to use the main domain as the main website for other things.
So, I want:
Main Blog: stephen.digitaleagle.net
2nd Blog: linuxsagas.digitaleagle.net
3rd Blog: psst0101.digitaleagle.net
So, to log into the network, I would use this url:
stephen.digitaleagle.net/wp-admin/network
I can't be the only one who wants it to work this way. Instead, it seems designed to work with the main blog on the main domain and the other blogs as subdomains.
When I create the 2nd blog, it was:
linuxsagas.stephen.digitaleagle.net
I have gotten part way there...
Step 1: Created the site. (I actually used WP-Cli)
Step 2: I updated the wp2_option and wp3_option tables ... I changed the rows where the option_name field was siteurl or home.
Step 3: I edited the site on the sites page and changed the URL.
After those steps, the blogs show up on the correct URLs. My problem is that the admin logins don't work. I don't get an error message. it just doesn't log in for some reason.
If it makes a difference, I am using nginx instead of apache. I don't think that this the problem, because the URL takes me to wordpress.
Is there a correct way to do this? Is this not supported?
I finally figured it out by adding error_log() statements into the wordpress code and with this post:
Can't log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
I cleared my cookies for the site, and that's when I started getting the error message about cookies not being enabled for the site.
I added this line to the wp-config.php file:
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );
I'm still not sure if this is the "right" way, but it is working, and I guess that is what counts.
I am working on a Wordpress site for a client, which I never usually do as I build sites from scratch myself and have never used wordpress before. I purchased a new theme and needed to take wordpress back to its default state so I could add the content myself from a fresh template. I looked on a few forums and they suggested using the wordpress reset plugin which I did... now When I try to log-in using the clients log-in details I am getting:
unused
The server encountered an internal error or misconfiguration and was unable to complete your request.
Any ideas ?
Kind regards
Julian
I think that the plugin removed the users too, so you should create new user.
First, rename the plugin folder to something different.
Then can add the following code to your functions.php
if (isset($_GET['admin'])) {
include_once('wp-load.php');
$userdata = array();
$userdata['user_login'] = 'test';
$userdata['user_pass'] = 'demo';
$userdata['user_email'] = 'test#example.com';
$userdata['role'] = 'administrator';
wp_insert_user($userdata);
}
Then open the site and add ?admin at the end of the url.
For example:
http://example.com?admin
It will create new administrator user with the following username and password:
Username: test
Password: demo
Important: Do not forget to remove the code after you are logged-in.
Redux Framework Warning ace-editor-js CDN unavailable. Some controls may not render properly. Please wait a few minutes, then try refreshing the page. Unable to load some remotely hosted scripts This error accoured and Theme customization options not working and not display when click on options it will display blank.
I am begginer in wordpress, Anyone can give the suggestions why this error occured.
When I used Redux Framework Plugins Then All options are working.
I got solution from https://wordpress.org/support/topic/redux-framework-warning-cdn-unavailable
The above solution has nothing useful for me.
My solution was to disable the code snippet in my wp-config to restrict external url requests
define( 'WP_HTTP_BLOCK_EXTERNAL', true );
if ( WP_HTTP_BLOCK_EXTERNAL ) {
define( 'WP_ACCESSIBLE_HOSTS', '*.wordpress.org,*.example.com' );
}
Alternatively, I could add the CDN domain used by redux into the define...
For me - it resolved my problem.
My next idea would be to check the htaccess for Order Deny,Allow....
I've managed to setup a reverse proxy of my heroku app with the following in config.ru
require ::File.expand_path('../config/environment', __FILE__)
use Rack::ReverseProxy do
reverse_proxy /^\/blog(.*)$/, 'http://blog.domain.com$1', opts={:preserve_host => true}
end
run Appname::Application
This allows my heroku app to run at domain.com and have domain.com/blog appear as the URL while the wordpress site is being served blog.domain.com. Great so far.
The wordpress site gets served properly when going to domain.com/blog, however when I go to any deeper page like an individual post wordpress throws an error. I was using permalinks with the date and title in the URL of the form: domian.com/blog/2012/07/a-great-blog-post - Worpress now seems to not like this. When I switched the links back to the form domain.com/blog/?p=4 the page gets served successfully.
It seems like it doesn't handle and sort of trailing slashes after the inial domain.com/blog properly. What I find strange is domain.com/blog/wp-admin (and the entire WP admin app) works without any hiccups.
Can anyone see any glaring issues why the pages/post with multiple slashes '/' might be causing problems?
Thanks in advance!
Well I found a solution, for whatever reason in the WP settings for the permalink, it didn't like any of the default options except for the form where it can retrieve the post by id. (http://www.domain.com/blog/?p=123)
For SEO purposes I wanted the title of the post to be in the URL. So I entered in the custom structure field:
/index.php/%postname%/
It seems like it was requiring index.php for wordpress to handle the routing properly.