Does wordpress updation affect wp-content plugin - wordpress

Does wordpress updation affect wp-content plugin folder..Can i upgrade my wp version by keeping all plugins activated?? I use hotlink protection and when i try to deactivate it its showing cant open file, how do i do??shall i keep as it is and start upgradation??
Please help me this.Thanks.
[Please only indent text if you want it to appear in a code block]

That depends on how you update / upgrade your WP.
If you do it manually by FTP :
Overwrite all files except :
wp-content ( folder in root dir )
wp-config.php ( in root)
.htaccess
If you do it automatically with the wp interface :
Same as above , and nothing should be affected . but make sure you
update ONLY the wp core files, and not the plugins that you do not
want to update ( the interface will give you ALL updates )
In both ways your plugin files / settings will should not be affected unless they become non-compatible for some reason with the new wp version ( you did not specify )

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' );

Pre-install and pre-activate wordpress plugin

I am trying to pre-install and pre-activate WordPress plugin(s) for my users.
The problem: I cannot fully setup the WordPress'es for them. Just setup database connection params, nothing more.
So using wp-cli is not possible, it requires to have the wp core to be installed.
Is there any way to pre-install and (!) pre-activate plugins using their default params?
make a folder "mu-plugins" in wp-content directory and put the plugin files in this folder you want to pre activated.
Option 1: Use Wordpress multisite, and network activate the plugins you want
Option 2: In wp-config setup a default theme define( 'WP_DEFAULT_THEME', 'twentyseventeen' );
In the default theme bundle in your plugins, and include them in your plugins folder.
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
activate_plugin( 'contact-form-7/wp-contact-form-7.php' );

Unable to upload new theme to wordpress from dashboard

I installed wp to a server for the first time. The basic theme works and I can change the settings but I bought a new wordpress theme and was trying to upload it from the dashboard:
But it gives me an error each time:
These were suggestions I found online but didn't work:
So I tried to change the permissions of all of the folders to 755. And then I changed the permissions of the file update.php to 755 also but I still get the same error. I also tried editing the .htaccess of the folder 'AALimo' (folder which contains the wp dir) but that didn't work either. I'm not sure if I edited the .htaccess properly.
I just manually uploaded the theme into the theme directory using ftp instead of the theme uploader from dashboard and that worked.
I did it using C-Panel. I had to upload zip file in WordPress theme folder in public html. extract the zip file and you can install it easily .

wordpress change themes location

Usually all the wordpress themes are uploaded and saved over the server say http://example.com/wp-content/themes/ . I am developing a plug-in to change this path to something like http://xyz.com/themeFolder/ . So i have to develop such a functionality where my wordpress installation will be on one server and the themes and plug-ins folders will be on another server.
Any help, will be highly appreciated.
Thanks in advance to all the genius people out there :)
Since Version 2.6, you can move the wp-content directory, which holds your themes, plugins, and uploads, outside of the WordPress application directory.
Set WP_CONTENT_DIR to the full local path of this directory (no trailing slash), e.g.
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' );
Set WP_CONTENT_URL to the full URI of this directory (no trailing slash), e.g.
define( 'WP_CONTENT_URL', 'http://example/blog/wp-content');
SOURCE
Do not forget to check THIS page as well.

Getting a 500 internal server error for wordpress?

I already tried doing the php.ini memory=20MB solution but it did not work. I uploaded it under the wp-admin/ folder.
I'm not really sure what else to try. Help?
The memory bump doesn't go into an .htaccess file in wp-admin. It goes into the .htaccess in web root. Use FTP to find and delete the .htaccess file you put in wp-admin.
Then forget about .htaccess files and try adding the line below near the top of your wp-config.php file, a few lines after the opening <?php
define('WP_MEMORY_LIMIT', '64M');
Renaming plugin directory temporary solved the problem for me
This problem occurs because your php dont't have any xml or has a deprecated version xml, so if you manually instal or update your xml, the problem will be solve.
If you using Ubuntu, try execute this code in your terminal:
sudo apt-get install php-xml
After this you need to restart apache so it takes effect, for this execute the command:
sudo service apache2 restart
Go to setting -> permalink and then select any common setting after that save it.
Reload the website. Everything will be fine.
Then reset it to previous common setting so that it will not effect for URL.
A 500 error is an Internal Server Error, which sometimes can be a hosting configuration problem, but in WordPress it is often a fatal PHP error.
First, just remove that php.ini file - some web hosts do not allow you to modify the PHP settings, so let's take that out of the mix first.
If it is a server error, temporarily rename your .htaccess file to something else (to take it out of the mix as well). Also, check for an error_log file in your filesystem, or the Error Logs in your hosting control panel.
If that doesn't tell you anything, it is likely a PHP issue. Turn on WordPress Debugging by adding the following code to your wp-config.php file:
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
#ini_set( 'display_errors', 0 );
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );
Make sure you comment out the line that says:
define( 'WP_DEBUG', true );
Now, when you refresh the page and get the error, WordPress will write any PHP errors to wp-content/debug.log. Check that log for a fatal PHP error - it will tell you which file is causing the error, often a theme or plugin file.
Once you know the cause, rename that theme or plugin to temporarily remove it from WordPress. That should restore normal functionality.
Another important fix for the internal server error is to try and upload a fresh version of wp-admin and wp-includes to your site.
This step should be a last resort, but if you’ve used the above solutions and still cannot find one that works, it’s worth a try. Backup your site, and download a fresh version of WordPress from the main site.
Extract the files from the ZIP file, and open the extracted folder. Open your site’s root directory in an FTP client, and upload the wp-admin and wp-includes from your fresh version of WordPress to your site’s directory, overwriting the older versions.
Refresh the client, and refresh your site. If the error is gone, it was likely caused by a corrupted core file. If you still see the error, you may have no other option than to contact your host. Check it out for more WordPress internal server error fixes.

Resources