How to change Drupal 7 theme while getting HTTP Error 500 - drupal

This is with Drupal 7x. I loaded my theme on Drupal.  It has produced a HTTP ERROR 500.  That is all that appears on my browser window, that is.  Now I can not even get to the login pate to log on to the dashboard to fix this or even uninstall the theme.  Please help.  For now I would not mind too much if I could just set things back to the way they were before I made the Porto theme my default theme.

You can use drush to set the theme back to one that works with:
drush vset theme_default name_of_working_theme
to set the backend theme:
drush vset admin_theme name_of_working_theme

Related

Elementor Not Loading On WordPress Subdirectory Installation With Composer

WordPress in its own directory using Composer
Troubleshooting Elementor Infinite Loading Screen
Inspired by roots/bedrock, I started a project to install WordPress to its own subdirectory using Composer. Plugins and Themes are installed from WPackagist, separately from the core WordPress files, also using Composer.
I ran into an issue with Elementor, which was stupid simple to fix. However, when I was in the process of fixing it, my Stack Overflow query, 'wordpress composer “elementor” -visual', returned nothing interesting. So I set out to write a quick troubleshooting guide for my own oversight. I have been obsessed with using Composer for WordPress dependencies lately, so I'm excited to write about it.
Anyway, after setting up the WordPress core and plugins using Composer, and setting up my database credentials in wp-config, I can login to the dashboard just fine.
Here's the Issue
In the dashboard, I see an issue immediately; the Elementor icon is missing, showing a generic gear instead. Here is the first clue that Elementor cannot find its own assets.
Furthermore, when I try to create a new page in Elementor, I see only an infinite, white Loading screen. Additionally, the "Edit with Elementor" button is missing when creating new posts and pages.
Initial Debugging Methods
Turn on PHP debugging in wp-config.php -> Revealed nothing enlightening.
Remove all other plugins besides Elementor -> No changes.
Turn on Safe Mode in Elementor > Tools -> Revealed nothing enlightening.
What next?
I will tell you how I fixed this issue.
Developer Console Insights
To finally resolve this issue, I opened the developer console (CTRL+SHIFT+I) and inspected some of the 404 links in the Network tab. An issue was immediately apparent: the filepath was incorrect. My project's folder is called "subdir-wp-elementor", not "subdir-wordpress".
Here is what Elementor was trying (and failing) to load:
http://localhost/subdir-wordpress/app/plugins/elementor/assets/js/editor-modules.min.js?ver=2.9.12
Resolution: Update CONTENT_URL in wp-config
I realized that I had forgotten to update the CONTENT_URL definition in wp-config.php
My SITE_URL was http://localhost/subdir-wp-elementor/, but here was my CONTENT_URL:
// ========================
// Custom Content Directory
// ========================
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/app' );
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/subdir-wordpress/app' );
Setting the correct CONTENT_URL to the below allowed Elementor to properly load.
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/subdir-wp-elementor/app' );

Wordpress error when installing parent theme

I'm new to web dev: trying to install a custom theme to Wordpress. Running Windows 10 and working on a local server with MAMP.
When I went to see my theme, I get the following message:
Broken Themes
The following themes are installed but incomplete.
Name Description
mywebsite The parent theme is missing. Please install the "mywebsite;" parent theme.
Error I get when trying to install:
An unexpected error occurred. Something may be wrong with WordPress.org or this
server’s configuration. If you continue to have problems, please try the support
forums.
Does anyone know how I fix this?
Thanks
check if in your theme-child style.css has:
/*
Theme Name: yourtheme-child
Template: yourtheme
Text Domain: yourtheme-child
*/
and in theme style.css:
/*
Theme Name: yourtheme
*/

how to install my theme using wp quick install script?

i am using WP Quick Install Script to install WordPress and it works fine. but it's not installing my custom theme. i also placed theme as theme.zip in WP-quick-install folder but it shows a white blank screen on front-end.
what is wrong there?
Any reason why you are using WP Quick Install in the first place?
I would simply suggest setting up the site as normal and adding your theme into the /themes/ directory.
If this is daunting, just shout, but first read the Wordpress Codex - Installing Wordpress

Wordpress RPM not showing plugins update

We have a Wordpress multisite 4.2.2 RPM installation on CentOS 6.6 and in the network plugins panel, the add plugin button and the plugins updates are not showing up (100% sure some plugins are not up to date).
The odd thing is when heading to /wp-admin/network/plugin-install.php, it says we haven't sufficient permissions to access the page. Note that we have a superadmin account.
So far, we tried to comment the config line define( 'DISALLOW_FILE_MODS', true ); and changing all the salt in the config ... no luck.
We tested our server connection to api.wordpress.org:443 and planet.wordpress.org:443 without any problem.
Also note that we have a second WP installation on the same server (not multisite) which is working as intended.
Any clue is welcome, thanks !
We find out it was a problem with the config.
We needed to keep define('AUTOMATIC_UPDATER_DISABLED', true); and we commented define( 'DISALLOW_FILE_MODS', true );.
But DISALLOW_FILE_MODS need to be set as false, not just commented otherwise default value is true i guess.

Wordpress New Post Edit Toolbar is Missing

Symptom:
When I start a new post on my Wordpress (example: http://website.com/wp-admin/post-new.php), I have the following problems:
The tinyMCE editing toolbar is missing, and
Text does not appear when typed in the body of the new post
Attempts:
Following Wordpress' guidelines, I tried the following without success:
Deactivate all plugins -- still no edit toolbar.
Use other browsers -- same error in Chrome, Firefox, and IE on multiple machines.
Enable SCRIPT_DEBUG in wp-config.php -- same error.
Viewing browser errors in Chrome -- see below.
I opened Developer Tools ("F12") in Chrome on the new post page and found the following 3 errors:
Failed to load resource: the server responded with a status of 404 (Not Found) -- [wordpress-website]/wp-includes/js/tinymce/tiny_mce.js?ver=349-20805
Uncaught ReferenceError: tinyMCE is not defined -- wp-langs-en.js:1
Uncaught ReferenceError: tinyMCE is not defined -- post-new.php:760
Question:
What must I do to get the edit toolbar back?
404 errors are an indication files may be missing. Have you verified the files haven't accidentally been moved or deleted?
You can replace the contents of the wp-includes/ directory where TinyMCE is located. You can either do this via the admin area updater, or you can do it manually.
Automatic way
Log into your WordPress admin area
Navigate to Home > Updates
Click the Re-install Now button
Manual way
Download a copy of the version of WordPress you are currently
running (if you are not running the current version you can find a copy in the release archive)
FTP into your site
Make a backup of your wp-content/ directory
Delete the wp-includes/ directory from the server
Upload the entire wp-includes/ directory from the new copy of WordPress you downloaded
You should now have a completely replaced wp-content/ directory and all of the TinyMCE files will be on your server.

Resources