How can I active a wordpress plugin after upload from back-end source code - php

I'm facing a problem which is wordpress plugin related. I've deactived WooCommerce plugin for a reason from wp dashboard then my site is not showing any kinds of WooCommerce related topic. And after that I can't access my wp-admin panel "Error thrown
Call to undefined function WC()" this message is showing. I think if I can active the plugin again then the problem will be solved. But I still can't access admin panel. So, I want to active it again from site cPanel back-end source code. Can anyone help me ?
Thanks in advance
-Arefin

Yes you can do it from database.
First go to PHPMyadmin & select your database and go to the wp_options table. In options table find active_plugins in option_name field.
Here you will find like below(Format done for understanding)
a:5:{
i:0;s:33:"classic-editor/classic-editor.php";
i:1;s:36:"contact-form-7/wp-contact-form-7.php";
i:2;s:31:"custom-plugin/custom-plugin.php";
i:3;s:47:"jwt-authentication-for-wp-rest-api/jwt-auth.php";
i:5;s:29:"wp-mail-smtp/wp_mail_smtp.php";
}
Now add your woocommerce plugin into this. For adding plugin increment a to 6(a:6) from 5(a:5) and add your plugin. In this array i stands for item number & s stands for string length
a:6:{
i:0;s:33:"classic-editor/classic-editor.php";
i:1;s:36:"contact-form-7/wp-contact-form-7.php";
i:2;s:31:"custom-plugin/custom-plugin.php";
i:3;s:47:"jwt-authentication-for-wp-rest-api/jwt-auth.php";
i:4;s:27:"woocommerce/woocommerce.php";
i:5;s:29:"wp-mail-smtp/wp_mail_smtp.php";
}

Related

how to customize article manager in Joomla administrator

i am not that much export in Joomla. and i stuck at one problem.
i want to add some custome fields in article manager page when we add / edit article from admin side. just like wordpress when i add some function in function.php page it reflacts on wp-admin side.
also i want that selection to be effect on front side.
can some one show me is there any way i can add a function in my theme which will show a custome selection fields on admin side and based on that front page changes.
i am using Joomla 3.4
Thanks in advance
You need to write a plugin to add this functionality. There is a recipe here. In the example they are using the #__user_profiles - table, which might be okay, but adding your own table might be more flexible.
This here might also be a useful link.

Magento mutisite theme issue

I am using magento multisite functionality using this tutorial on my localhost:
http://www.templatemonster.com/help/magento-how-to-set-up-and-manage-multiple-stores.html
Using it I have successfully created multisite in magento but I am unable to set theme in my another site which I created. I have tried to system->design and system->configuration->design both options but did not get any success yet.
The another site is rendering by base/default but I had set it to default/modern.
Please tell me what is going wrong?
PS: sorry I cant post snap but I have following configurations:
Main Website
Main Website Store
Default Store View
mytheme/default
My Site
My Store
My Store View
default/modern
ok I got the issue,
I have to set base url as localhost/magento/ and base link as localhost/magento/mysite2/ but I had set localhost/magento/mysite2/ for both. anyway thanks for help.

Wordpress - custom post types with custom fields, gone from admin menu

I followed the below tutorials in order to create a custom post type with custom fields.
https://www.youtube.com/watch?v=-r1b0wA98Ew
https://www.youtube.com/watch?v=6URWfMTsWPo
This worked great and I added lots of data using the forms I'd created and had the data displaying on the front end of the website.
A week ago, the custom post type disappeared from the Admin Menu but the the data seems to be intact from the front-end point of view. I posted a message in the CPT UI wordpress forum and got told to simply re-add the post type and re-link the data back up.
My question is HOW do I re-link the data back up? I have re-added the Custom Post type so its ls listed in the admin menu, but I need to be able to edit the custom posts I have already added. Can anyone help? Not getting much help from the Wordpress forum. Thanks
AS the data is intact in the front end it means the entries are still in database and nothing is lost.
It is correct way to just re-add the missing post-type and WordPress will now automatically re-link/re-connect your existing data, since WordPress is storing custom post type in the wp_posts table with post_type field value to your user-defined value.
Just make sure that the post-type name is same as you used earlier because slight mistake in spelling will lead to data not displayed in admin panel as expected.
You can also post further details which would be helpful to get actual problem found out.
#leetee this has 50/50 chance, experimental and since there is no way to reproduce this behaviour; try exporting your custom post types by using Tools -> Export and then see if you could Import them into a fresh WP install...

Magento Cant Update product attribute from magento admin panel

After editing short description from magento admin panel and clicking on save, it shows message that it was saved successfully, but the short description was same before editing. I hope this issue is because of store view.
Has anyone else experienced this, and, what am I doing wrong?
If you use multiple store view...then on a drop would be came on left of each product view admin panel and here you should change store view according to your respective.after that you would change data of product.
Is effect visible in backend.
Are you sure you are viewing same store view for edit effect where you edited.In left sode you have an option to select store.
If effect visiblein backend and not in front end then you need to clear cache.Also if you are looking intp some listing page you need to do reindexing.

Custom Wordpress 3.5.2 plugin "You do not have sufficient permissions to access this page."

I have been trying to integrate a custom Wordpress plugin called custom_rss into Wordpress by following http://net.tutsplus.com/tutorials/wordpress/creating-a-custom-wordpress-plugin-from-scratch/.
I have successfully achieved the proper URL in the menu items for settings. However, when I click on the custom_rss link under settings, the url that loads the plugin just returns content with the text You do not have sufficient permissions to access this page.. I am logged in as the super user admin.
The script that fires when the menu item is clicked is wordpress/wp-admin/options-general.php which passes page as its parameter :options-general.php?page=CustomRSSGenerator.
Does anyone have any ideas about how to allow privileges for this page or better yet, has anyone found out how to do a custom plugin for Wordpress 3.5.2 who can offer a solution to my problem? This has been beating me for about a week now and any advice is appreciated.
So there is a solution!
If you read the comments below the tutorial you will find a comment by a Robert character which states:
Great article. 2 things:
1. The following code produces an error in Admin panel, that makes the page inaccessible:
add_options_page("OSCommerce Product Display", "OSCommerce Product Display", 1, "OSCommerce Product Display", "oscimp_admin");
ERROR: "You do not have sufficient permissions to access this page."
To remove this error, modify the above code to:
add_options_page("OSCommerce Product Display", "OSCommerce Product Display", 1, "OSCommerce_Product_Display", "oscimp_admin");
That change will help you display the page correctly when the link
"OSCommerce Product Display" is clicked under the "Settings" menu
option. Hope this helps anyone who experienced a problem with the
code.
"The first parameter of this function is the option name which will be sued later to uniquely identify this option and its value." It
should have been "used" but incorrectly spelled as "sued". Not a big
deal, but just wanted to let you know.
Posting on this old topic because it was the most relevant Google result when I was searching after running into a similar problem so I figured I'd add my fix.
I had a really similar problem where any change I made to the page slug resulted in an insufficient permission error. At first I thought my page slug must be getting referenced somewhere else in my code so I searched and found no other references. I also tried stripping away every line of code outside of the basic plugin instantiation code but it still didn't work.
The fix was to deactivate then reactivate the plugin (within admin UI). I'm guessing upon plugin activation wordpress adds various entries to it's DB; some of which are likely your plugins name, menu page names, slugs, etc. After reactivating the plugin, the exact code that previously threw permission errors now worked perfectly.

Categories